Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A version of pytz that works well on Google App Engine.

Project description

pytz has a severe performance problem that impedes its usage on Google App Engine. This is caused because pytz.__init__ builds a list of available zoneinfos checking the entire zoneinfo database (which means: it tries to open hundreds of files). This is done in the module globals, so it is not easily avoidable. And it is far from ideal to do this in App Engine - app initialization becomes unacceptable if every time we import pytz it checks 500+ files.

In this alternative version, pytz is highly optimized for App Engine, following ideas from several recipes around:

  • database files are not automatically reads when the module is imported
  • the database files are loaded using zipimport to reduce number of files
  • it uses memcache to cache already loaded zoneinfos

This results in almost unnoticeable load time and makes pytz usable on App Engine.

Project details


Release history Release notifications

This version
History Node

2011h

History Node

2011c

History Node

2011b

History Node

2010l

History Node

2010h

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
gaepytz-2011h.tar.gz (373.4 kB) Copy SHA256 hash SHA256 Source None Jul 12, 2011
gaepytz-2011h.zip (376.7 kB) Copy SHA256 hash SHA256 Source None Jul 12, 2011

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page