This project is assuming you are familiar with the app engine basics:
if not please check guestbook tutorial
a simple example with FireStore
Optional: Try to use the DataStore instead
Practice for google app engine python with Vue
download the project
To install python its possible to use brew however python2 is no longer supported
For python use virtual env and
virtualenvwrapper
to setup your environments
- install
google app engine sdk
-- The app-engine-python package is required
In the commandline go to project and check theglcoud components list
. If app-engine-python is not installed run:gcloud components install app-engine-python
see GAE local run
- install nodejs -- install version 16
use the commandline and go to the project.
Within this project mulitple smaller projects are defined app, worker and web. Since we are running
the javascript we should got to the web folder.
Now type npm install
this will install all java script dependencies for the project.
now webpack needs to watch the javascript files and place the generated files in the static/dist folder.
type npm run dev
since watcher is defined in dev modus the script will keep running and detect changes.
To run this project you will need like in the FireStore example an emulator for the datastore.
install the datastore emulator
for now use a test environment:
gcloud beta emulators datastore start --project practice-garage --host-port localhost:8000
To run the application run the script dev_appserver.py
This will automatically start the server with all env variables set.
Sadly google did not include a datastore viewer in gcloud, but luckily for us there is a package called Datastore Emulator UI to get this functionality back.
To install run the following command npm i -g @streamrail/dsui
In terminal run gcloud beta emulators datastore start --project practice-garage --host-port localhost:8000
for the datastore emulator.
In separate terminal run dsui -r practice-garage -e localhost:8000
for the datastore viewer.
Run python script dev_appserver.py
for the actual application.
datastore
ndb (ndb client library for use with Google Cloud Datastore)
flask
datastore emulator