Skip to page content Skip to main navigation
English | Site Directory

e.g. "templates" or "datastore"

# Third-party Python Libraries

In addition to the Python standard library, the App Engine APIs and tools, the App Engine Python runtime environment includes several third-party libraries that your application can use. Some of these libraries have been customized or reimplemented to run within the App Engine sandbox restrictions. This page documents which libraries are available and how the App Engine implementations differ from the original versions.

- Antlr 3
- Django 0.9.6
- PyCrypto
- WebOb
- YAML
- zipimport

## Antlr 3

Antlr is a framework for language parsers and translators. The App Engine Python SDK uses Antlr to support the parsing of cron schedule configuration. App Engine provides Antlr 3.1.1 for Python.

## Django 0.9.6

Django is a full-featured web application framework for Python. It provides a full stack of interchangable components, including dispatch, views, middleware, and templating components, and many others. App Engine includes a version of Django to make it easy to get started developing applications using a few of its components, such as the templating library.

The Django data modeling interface is not compatible with the App Engine datastore. You can use the App Engine data modeling libraries in your Django applications. However, third-party Django applications that use the Django data modeling interface—most notably Django's Admin application—may not work with App Engine directly.

The App Engine Python environment includes Django 0.9.6. This is not the latest version. If you are interested in using the Django stack for your applications, we highly recommend getting the latest version from the Django website and using it instead of the included version. See the following articles for information on best practices for using Django with App Engine:

- Using Django 1.0 on App Engine with Zipimport
- Using the Google App Engine Helper for Django
- Unleash Django with app-engine-patch
- Running Django on Google App Engine

## PyCrypto

App Engine includes a custom version of the Python Cryptography Toolkit, also known as PyCrypto. The version included with App Engine is based on pycrypto 2.0.1. This is not the latest version, but should be largely compatible with more recent versions.

For reasons both technical and legal, the App Engine version of PyCrypto has the following differences from the original PyCrypto 2.0.1:

- The RC5 and IDEA ciphers have been removed.

- The MODE_PGP encryption mode has been removed.

- All public key cryptography routines are implemented in pure Python code. They do not use any native acceleration (C code).

## WebOb

WebOb is an object-oriented interface for HTTP requests and responses. App Engine uses WebOb as part of the webapp web application framework. The environment provides WebOb 0.9.

## YAML

YAML is a data format for human-readable message serialization. The App Engine Python SDK uses YAML as the format for its configuration files. The environment provides the YAML parsing libraries for Python, PyYAML 3.05.

## zipimport

zipimport is a feature of the Python standard library for importing Python modules from Zip archive files. You can use zipimport to save space and reduce the number of files used when including packages with your application. For example, you can use zipimport to bundle Django with your application so the Django code only uses 1 megabyte of storage and 1 file, instead of several megabytes and hundreds of files.

App Engine provides a custom implementation of the zipimport library that runs within the environment's sandbox restrictions. It functions similarly to the version included with the Python standard library, with the following exceptions:

- zipimport can only import modules stored in the archive as `.py` source files. It cannot import modules stored as `.pyc` or `.pyo` files.

- zipimport is implemented in pure Python, and does not use native code for decompression (C code).

Note: The local development server uses the standard library version of zipimport, not the custom version used when running on App Engine. If you use features of zipimport, be sure to test your application on App Engine.