Skip to main content

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


Download files

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

Source Distributions

gaepytz-2010l.zip (385.2 kB view details)

Uploaded Source

gaepytz-2010l.tar.gz (381.6 kB view details)

Uploaded Source

File details

Details for the file gaepytz-2010l.zip.

File metadata

  • Download URL: gaepytz-2010l.zip
  • Upload date:
  • Size: 385.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gaepytz-2010l.zip
Algorithm Hash digest
SHA256 d7c223c88fe982b4973ada1077077616a0fd1ccd58899bb2de16298844104924
MD5 8c5b39da54e0ed2814e7f9bd7d394a5e
BLAKE2b-256 26027c34b5cf1d005a4d9038634a9065613a5f7ae257f15339e7b8b6d7d1344b

See more details on using hashes here.

File details

Details for the file gaepytz-2010l.tar.gz.

File metadata

  • Download URL: gaepytz-2010l.tar.gz
  • Upload date:
  • Size: 381.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gaepytz-2010l.tar.gz
Algorithm Hash digest
SHA256 448f1123604e644b36ca25bfb0aa9ca46591140e5d83efd94e0a5ec3f42f6a95
MD5 ca88834fdf85e496ea23cf0febd8f6b6
BLAKE2b-256 34182c9ad1bb7499559315ea463e06e1acdffb91cc61b2fb4f5df0797678a854

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page