A utility library for Google AppEngine
This library provides a number of common utilities, decorators, and conveniences to simplify development of applications on Google AppEngine (in Python).
The problem: webapp2 provides a fantastic number of very flexible features, but they often require a degree of custom code that just gets annoying, especially considering Python's refrain of "don't repeat yourself."
This library enables many of those features by default, with sensible default settings, and provides easy access to the essential interfaces.
This project's documentation is broken into several components.
- Basic Usage Application fundamentals
- JSON API extensions Building an API service
- HTTP Digest Authentication Secure authentication within the app
- Google Analytics API kit Reusable components for the Analytics V4 API
- BigQuery API kit Sensible object abstraction on BigQuery datasets
- Testing Your Application Simplifying the test architecture
- Go with the Flow Procedural, stateful out-of-band workflow tooling.
- Install Google AppEngine from AppEngine Downloads
- In your project directory, install the Webapptitude library to your local vendor libraries path (often
- Configure your project's
appengine_config.pyto load vendor libraries.
Step 2: installing vendor library
Perhaps the simplest approach: install the library in a one-shot command to the
pip install -t lib webapptitude
It's recommended to append the package to your projects
pip can manage them reporducibly in the future.
requirements.txt file would then look something like this:
# other libraries you might need... Markdown==2.5.2 webapptitude
You can then install all required packages more reliably:
pip install -t lib -r requirements.txt
Step 3: configure your application
appengine_config.py, placed in project root, the following code enables
your application to use libaries/modules from a path
lib within the project.
This is generally required for applications which depend on third-party libraries
that Google doesn't already provide.
from google.appengine.ext import vendor # Add any libraries installed in the "lib" folder. vendor.add('lib')
AppEngine also provides several versions of various libraries. This can cause confusion when a feature in a newer version is absent from an older version, and the application may (automatically) select an older version of the library. Because Webapptitude aims to address modern development needs, we prefer to target the latest versions of these dependencies.
Recommend adding the following specification to application configs:
libraries: - name: yaml version: latest - name: webob version: latest - name: webapp2 version: latest - name: jinja2 version: latest - name: django version: latest
The application configuration files include:
- all modules noted by
dispatch.yaml, their respective yaml files.