{"id":13468089,"url":"https://github.com/kamalgill/flask-appengine-template","last_synced_at":"2025-12-17T00:43:59.125Z","repository":{"id":1078784,"uuid":"922933","full_name":"kamalgill/flask-appengine-template","owner":"kamalgill","description":"Boilerplate project template for running Flask on Google App Engine -- supplanted by https://github.com/kamalgill/cloud-starterkit-flask-appengine","archived":true,"fork":false,"pushed_at":"2019-12-24T20:16:02.000Z","size":3367,"stargazers_count":1074,"open_issues_count":4,"forks_count":205,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-03-24T07:09:54.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamalgill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"licenses/Blinker-license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-19T17:42:15.000Z","updated_at":"2025-03-21T14:38:59.000Z","dependencies_parsed_at":"2022-06-27T17:15:09.504Z","dependency_job_id":null,"html_url":"https://github.com/kamalgill/flask-appengine-template","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamalgill%2Fflask-appengine-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamalgill%2Fflask-appengine-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamalgill%2Fflask-appengine-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamalgill%2Fflask-appengine-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamalgill","download_url":"https://codeload.github.com/kamalgill/flask-appengine-template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245584941,"owners_count":20639648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:01:05.364Z","updated_at":"2025-12-17T00:43:59.081Z","avatar_url":"https://github.com/kamalgill.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Flask on App Engine Project Template (Deprecated)\n=================================================\n\nIMPORTANT: This project is deprecated (primarily due to Python 2 end-of-life as of 1 Jan 2020) \nand has been supplanted by the following, which supports Flask in Python 3\non Google App Engine's second-generation runtimes...\n\nhttps://github.com/kamalgill/cloud-starterkit-flask-appengine\n\nBoilerplate project template for running a Flask-based application on\nGoogle App Engine's Standard Python 2.7 Runtime\n\nSimilar boilerplate projects are listed below:\n\n- [gae-init](https://github.com/gae-init/gae-init)\n- [gae-boilerplate](https://github.com/coto/gae-boilerplate)\n\n\nApp Engine Flexible Environment\n-------------------------------\nThis project does not currently support deployments on the App Engine Flexible environment,\nalthough it could potentially work on App Engine Flexible with some modifications.\n\nSee the official [Quickstart for Python in the App Engine Flexible Environment][quickstart]\nif you are looking to deploy Python 2.7 and 3.x applications on App Engine\n\n\nAbout Flask\n-----------\n[Flask][flask] is a BSD-licensed microframework for Python based on\n[Werkzeug][wz], [Jinja2][jinja2] and good intentions.\n\nSee \u003chttp://flask.pocoo.org\u003e for more info.\n\n\nSetup/Configuration\n-------------------\n1. Download this repository via\n   `git clone https://github.com/kamalgill/flask-appengine-template.git`\n   or download the tarball at\n   \u003chttp://github.com/kamalgill/flask-appengine-template/tarball/master\u003e\n2. Copy the src/ folder to your application's root folder\n3. Set the application id in `src/app.yaml`\n4. Configure datastore models at `src/application/models.py`\n5. Configure application views at `src/application/views/`\n6. Configure URL routes at `src/application/urls.py`\n7. Configure forms at `src/application/forms.py`\n8. Add the secret keys for CSRF protection by running the `generate_keys.py`\n   script at `src/application/generate_keys.py`, which will generate the\n   secret keys module at src/application/secret_keys.py\n\nNote: Copy the .gitignore file from the tarball folder's root to your git\nrepository root to keep the secret_keys module out of version control.\n\nOr, add the following to your .(git|hg|bzr)ignore file\n\n\u003cpre class=\"console\"\u003e\n  # Keep secret keys out of version control\n  secret_keys.py\n\u003c/pre\u003e\n\n\nInstall python dependencies\n---------------------------\nThe local dev environment requires installation of Jinja2, PIL, and simplejson,\nwhich can be installed via:\n\n\u003cpre class=\"console\"\u003e\n  pip install -r requirements_dev.txt\n\u003c/pre\u003e\n\n\nFront-end Customization\n-----------------------\n1. Customize the main HTML template at\n   `src/application/templates/base.html`\n2. Customize CSS styles at `src/application/static/css/main.css`\n3. Add custom JavaScript code at `src/application/static/js/main.js`\n4. Customize favicon at `src/application/static/img/favicon.ico`\n5. Customize 404 page at `src/application/templates/404.html`\n\n\nPreviewing the Application\n--------------------------\nTo preview the application using App Engine's development server,\nuse [dev_appserver.py][devserver]\n\n\u003cpre class=\"console\"\u003e\n  dev_appserver.py src/\n\u003c/pre\u003e\n\nAssuming the latest App Engine SDK is installed, the test environment is\navailable at \u003chttp://localhost:8080\u003e\n\n\nAdmin Console\n-------------\nThe admin console is viewable at http://localhost:8000 (note distinct port from dev app server)\n\n\nFlask-Cache\n-----------\nThe handy Flask-Cache extension is included, pre-configured for App Engine's Memcache API.\nUse the \"Flush Cache\" button at http://localhost:8000/memcache to clear the cache.\n\n\nTesting\n-------\nPlace all your tests in src/tests directory. Test runner is placed in src directory. To run your tests simply go to src directory and do:\n\n\u003cpre class=\"console\"\u003e\n  python apptest.py path/to/your/googleappengine/installation\n\u003c/pre\u003e\n\nPath to your local google app engine installation must be provided as first argument to the script. If the path is long and you don't like to type it each time you run the tests you can also hardcode it in apptest.py, just edit the variable SDK_PATH and set it to your google app engine folder. \n\nBefore running tests set evironment variable FLASK_CONF to the value TEST. \n\nIn Linux this is done by:\n\n\u003cpre class=\"console\"\u003e\n  export FLASK_CONF=TEST\n\u003c/pre\u003e\n\nIn Powershell:\n\n\u003cpre class=\"console\"\u003e\n  [Environment]::SetEnvironmentVariable(\"FLASK_CONF\", \"TEST\", \"User\");\n\u003c/pre\u003e\n\nRemember to restart Powershell. Change of environment variable will take place after restarting Powershell. \n\nYou can specify your testing configuration (e.g. separate database for tests results) in src/application/settings.py.\n\nTo switch back to development configuration just set FLASK_CONF to DEV.\n\nDeploying the Application\n-------------------------\nTo deploy the application to App Engine, use [appcfg.py update][appcfg]\n\u003cpre class=\"console\"\u003e\n  appcfg.py update src/\n\u003c/pre\u003e\n\nThe application should be visible at http://{YOURAPPID}.appspot.com\n\n\nFolder structure\n----------------\nThe App Engine app's root folder is located at `src/`.\n\n\u003cpre class=\"console\"\u003e\n  src/\n  |-- app.yaml (App Engine config file)\n  |-- application (application code)\n  |-- index.yaml (App Engine query index definitions)\n  |-- lib/\n  |   |-- blinker/ (library for event/signal support)\n  |   |-- flask/ (Flask core)\n  |   |-- flask_cache/  (Flask-Cache extension)\n  |   |-- flask_debugtoolbar/  (Port of Django Debug Toolbar to Flask)\n  |   |-- flaskext/ (Flask extensions go here)\n  |   |-- gae_mini_profiler/ (Appstats-based profiler)\n  |   |-- itsdangerous.py (required by Flask \u003e= 0.10\n  |   |-- werkzeug/ (WSGI utilities for Python-based web development)\n  |   `-- wtforms/ (Jinja2-compatible web form utility)\n  |-- tests/ (unit tests)\n\u003c/pre\u003e\n\nThe application code is located at `src/application`.\n\n\u003cpre class=\"console\"\u003e\n  application/\n  |-- __init__.py (initializes Flask app)\n  |-- decorators.py (decorators for URL handlers)\n  |-- forms.py (web form models and validators)\n  |-- models.py (App Engine datastore models)\n  |-- settings.py (settings for Flask app)\n  |-- static\n  | |-- css\n  | | |-- bootstrap-*.css (Twitter Bootstrap styles)\n  | | |-- fontawesome-*.css (Fontawesome styles)\n  | | `-- main.css (custom styles)\n  | |-- font\n  | | `various fontawesome font files\n  | |-- img\n  | | |-- favicon.ico\n  | | |-- favicon.png\n  | | `-- glyphicons-*.png (Twitter bootstrap icons sprite)\n  | `-- js\n  |   |-- main.js (site-wide JS)\n  |   `-- lib/ (third-party JS libraries)\n  |     |--bootstrap-*.js (Bootstrap jQuery plugins\n  |     `--modernizer-*.js (HTML5 detection library)\n  |-- templates\n  | |-- includes/ (common include files)\n  | |-- 404.html (not found page)\n  | |-- 500.html (server error page)\n  | |-- base.html (master template)\n  | |-- list_examples.html (example list-based template)\n  | `-- new_example.html (example form-based template)\n  |-- urls.py (URL dispatch routes)\n  |-- views\n  |   |-- admin\n  |     `-- *.py (Views which require authentication)\n  |   |-- public\n  |     `-- *.py (Public views)\n\u003c/pre\u003e\n\n\n\nLicenses\n--------\nSee licenses/ folder\n\n\nPackage Versions\n----------------\n- Blinker: 1.4\n- Bootstrap: 3.0.0\n- Click: 6.7\n- Flask: 0.12.2\n- Flask-Cache 0.13.1\n- Flask-DebugToolbar: 0.10.1\n- Flask-WTF: 0.14.2\n- FontAwesome: 3.0\n- itsdangerous: 0.24\n- Jinja2: 2.6 (included in GAE)\n- jQuery: 3.2.1 (set in base.html)\n- Modernizr: 2.6.2\n- Werkzeug: 0.12.2\n- WTForms: 2.1\n\n\nCredits\n-------\nProject template layout was heavily inspired by Francisco Souza's\n[gaeseries Flask project][gaeseries]\n\nIncorporates [Flask-DebugToolbar][debugtoolbar] by Matt Good et. al.\nand [Flask-Cache][flaskcache] by Thadeus Burgess\n\nLayout, form, table, and button styles provided by [Bootstrap][bootstrap]\n\n[Font Awesome][fontawesome] by Dave Gandy\n\nHTML5 detection provided by [Modernizr 2][modernizr] (configured with all features)\n\n\n[appcfg]: http://code.google.com/appengine/docs/python/tools/uploadinganapp.html\n[bootstrap]: http://twitter.github.com/bootstrap\n[debugtoolbar]: https://readthedocs.org/projects/flask-debugtoolbar/\n[devserver]: http://code.google.com/appengine/docs/python/tools/devserver.html\n[flask]: http://flask.pocoo.org\n[flaskcache]: http://pythonhosted.org/Flask-Cache/\n[fontawesome]: http://fortawesome.github.com/Font-Awesome/\n[html5]: http://html5boilerplate.com/\n[jinja2]: http://jinja.pocoo.org/2/documentation/\n[gaeseries]: http://github.com/franciscosouza/gaeseries/tree/flask\n[modernizr]: http://www.modernizr.com/\n[profiler]: http://packages.python.org/Flask-GAE-Mini-Profiler/\n[quickstart]: https://cloud.google.com/appengine/docs/flexible/python/quickstart\n[wz]: http://werkzeug.pocoo.org/\n[wzda]: https://github.com/nshah/werkzeug-debugger-appengine\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamalgill%2Fflask-appengine-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamalgill%2Fflask-appengine-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamalgill%2Fflask-appengine-template/lists"}