Let's finish the work quickly and go TAP BEER!
Looking for sponsors:
- $120 - I get 30L barrel beer!
- $60 - I get 15L barrel beer!
- $12 - I get a 1-pint beer!
- $6 - I get 1/2 pint beer!
Supports:
- Google App Engine / Python 2.7
- Google Analytics for feature phone
- I18N / Python, HTML and JavaScript / babel
- Japanese han-kaku characters / 半角 / zenhan-py
- OAuth login / gae-simpleauth
- Google OAuth 2.0 authentication-based Users API (alternate of Google App Engine Users API)
- generating sitemaps
- sessions
- Google Cloud Endpoints API as a CRUD, avoid method naming conflict in implemented with multiple classes
- Endpoints Proto Datastore API
Low cost operating:
- Google Drive Spreadsheets as a database via Google Visualization API
- Google Drive Form-based feedback system
- hosting as a proxy
- DropBox
- Google Drive
- hostname-based multitenancy
- supports robots.txt
- just a few costs permanent caching and key-value store via taskqueue API
- minimum OAuth accounting
- redirecting to Google URL Shortener
Performance:
- pre-compiling jinja2 templates to Python byte code / jinja2precompiler
- uglify-js
Coding:
Development:
Testing:
- py.test
- coverage of tests / pytest-cov
- karma
Utils:
- CORS
- CSRF guard
- HMAC
- e-mail reports of errors
- fanstatic
- handling taskqueue
- managing cache records
- memoize
- ring buffer
- token bucket
Continuous Integration Supports:
$ git clone --depth 1 https://github.com/MiCHiLU/gae-tap.git
$ cd gae-tap
$ bundle install
$ npm install
$ mkvirtualenv --python=`which python2.7` gae-tap
(gae-tap)$ pip install -r requirements.txt
(gae-tap)$ pip install -r requirements-gae.txt
It need the GOOGLE_APPENGINE
environ args. Default GOOGLE_APPENGINE
as below:
GOOGLE_APPENGINE=$HOME/google-cloud-sdk/platform/google_appengine
If you want to set another path, define GOOGLE_APPENGINE
in environ as below:
$ GOOGLE_APPENGINE=<path to your gae> make
Alternatively, Quickly set up environment via Docker:
$ docker pull michilu/gae-tap
First, you must have been build core library:
(gae-tap)$ (cd gae/tap && make release)
Then, if you want to add templates of gae-tap to git repository:
$ git add \
gae/site-packages/tap_templates_compiled.zip \
gae/tap/static/js/admin_response_cache.js \
gae/tap/static/js/admin_response_cache.min.js \
gae/tap/static/js/error_page.js \
gae/tap/static/js/error_page.min.js \
gae/tap/static/js/utils.js \
gae/tap/static/js/utils.min.js
Alternatively, update the core library from releases:
- Download
gaetap-<release-number>.zip
file from https://github.com/MiCHiLU/gae-tap/releases - Then replace with files and directories in your repository.
If you want to start a new project with make scaffold
, as below:
$ make scaffold
your project name, default 'gae-tap': <type your project name>
your github user name, default 'MiCHiLU': <type your github user name>
your app-id, default 'gae-tap': <type your app-id>
(gae-tap)$ make
(gae-tap)$ make runserver
then access to:
- admin server: http://localhost:8000
- instance server: http://localhost:8080
- API Explorer: http://localhost:8080/_ah/api/explorer
First, you must be install iPython:
(gae-tap)$ pip install ipython
Then, type make shell
command as below:
(gae-tap)$ make shell
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
IPython 2.3.1 -- An enhanced Interactive Python.
Doctest mode is: ON
>>>
Access to the Datastore on the development environment in the iPython shell:
(gae-tap)$ make shell
>>> from google.appengine.ext import testbed
>>> tb = testbed.Testbed()
>>> tb.setup_env(app_id='dev~your-app-id')
>>> tb.activate()
>>> tb.init_datastore_v3_stub(datastore_file='../assets/tmp/datastore.db', use_sqlite=True)
>>> tb.init_memcache_stub()
>>> tb.init_taskqueue_stub()
>>> from your-app import model
(gae-tap)$ make deploy
Auto deploy via Wercker CI:
If you want to auto-deploy to the Google App Engine, add an APP_ENGINE_TOKEN
variable to Deploy pipeline
of Deploy targets
in your App
on the Wercker CI.
The APP_ENGINE_TOKEN
value is a refresh_token
of your $HOME/.appcfg_oauth2_tokens
, like follow:
$ jq .refresh_token ~/.appcfg_oauth2_tokens
"1/ABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890"
then access to:
- Server: https://.appspot.com/
- API Explorer: https://.appspot.com/_ah/api/explorer
- Developers Console: https://console.developers.google.com/project/
- Python 2.7
- Google App Engine
- Django 1.5.x
- Third-party Libraries in Python 2.7 on Google App Engine
- libxml2
- libxslt
- lxml
- GNU Make
- Bundler
- Node.js
- The `gcloud app Python Extensions component on the Google Cloud SDK does not include the Django package.
You can run a script:
$ ./assets/fetch_django-1.5.x.sh
You can patching to Google App Engine SDK:
$ patch -d $GOOGLE_APPENGINE -p0 -i $PWD/gae/tap/endpoints.patch
You can patching to Google App Engine SDK:
$ patch -d $GOOGLE_APPENGINE -p0 -i $PWD/gae/tap/docker.patch
Licensed under the terms of the MIT.
Copyright (c) 2013 ENDOH takanao