Hip Flask forks the Google App Engine Flask Skeleton and adds a little more meat to its bone so that you can get a Flask project up and running on the App Engine platform even more quickly.
It is behind small projects like https://github.com/klenwell/decruiter and larger projects like http://forekarma.com.
- Demo Site: https://hip-flask-on.appspot.com/
- Trello Board: https://trello.com/b/3w3mlaUf/hip-flask
- App Engine Dashboard: https://console.cloud.google.com/appengine
-
Install the App Engine Python SDK.
See the README file for directions. You'll need python 2.7 and pip 1.4 or later installed too.
-
Set up new project directory and clone this repo.
mkdir my-new-project cd my-new-project git clone https://github.com/klenwell/hip-flask.git app-engine -
Install dependencies in project's lib directory.
I recommend using a pyenv virtualenv.
cd app-engine pyenv virtualenv 2.7.7 hip-flask pyenv local hip-flaskInstall dependencies:
pip install -r requirements.txt -t lib -
Update config files.
First copy the dist secrets file:
cp -v config/secrets.py{-dist,}Then update
config/__init__.pyandconfig/secrets.py. -
Run local development server.
cd my-new-project dev_appserver.py --port=8080 --admin_port=8081 --api_port=8082 ./app-engineVisit the application http://localhost:8080
See the development server documentation for options when running dev_appserver.
First, install testing libraries:
cd my-new-project/app-engine
pip install -r requirements-test.txt
Then update nose.cfg settings, especially:
gae-lib-root=APP_ENGINE_PATH_HERE
To run tests:
cd my-new-project/app-engine
nosetests -c nose.cfg
With coverage:
nosetests -c nose.cfg --with-coverage --cover-erase \
--cover-package=config,models
To run a single test:
nosetests -c nose.cfg tests/controllers/test_pages_controller.py
-
Use the Admin Console to create a project/app id. (App id and project id are identical).
-
appcfg.py update -A <your-app-id> -e <your-user-name> ./app-engine -
Congratulations! Your application is now live at your-app-id.appspot.com