Skip to content

Practice for google app engine python with jinja2 jquery and testsuite

Notifications You must be signed in to change notification settings

Dimitar2000/humanwave-practice-garage

 
 

Repository files navigation

practice-garage

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

Setup python environment

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

Setup google app engine

  • install google app engine sdk
    -- The app-engine-python package is required
    In the commandline go to project and check the glcoud components list. If app-engine-python is not installed run: gcloud components install app-engine-python

see GAE local run

Setup npm and webpack

  • 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.

Further initialization

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.

Datastore viewer

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

Starting the server

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.

List of things

datastore
ndb (ndb client library for use with Google Cloud Datastore)
flask
datastore emulator

About

Practice for google app engine python with jinja2 jquery and testsuite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.8%
  • Vue 7.5%
  • CSS 1.1%
  • JavaScript 1.1%
  • HTML 0.5%