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-2011c.zip (389.5 kB view details)

Uploaded Source

gaepytz-2011c.tar.gz (386.4 kB view details)

Uploaded Source

File details

Details for the file gaepytz-2011c.zip.

File metadata

  • Download URL: gaepytz-2011c.zip
  • Upload date:
  • Size: 389.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gaepytz-2011c.zip
Algorithm Hash digest
SHA256 ff616b9c83e1861e0e5d6760bd688c6e4758b13c9ae1574cc9e870c20350d316
MD5 9c4a9befe965fb7bfd5ff353f0fca981
BLAKE2b-256 e982cd111d405cc8372ff5ed16cde991750693f1a6fcbe054051a134e23013db

See more details on using hashes here.

File details

Details for the file gaepytz-2011c.tar.gz.

File metadata

  • Download URL: gaepytz-2011c.tar.gz
  • Upload date:
  • Size: 386.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gaepytz-2011c.tar.gz
Algorithm Hash digest
SHA256 b200c0b97b0a3e0844c5fc729e88ee85e808e17e70fcff399ce682797c90a2a0
MD5 14d8a31805859df94b735e5fba8ceebf
BLAKE2b-256 96a327d1d20ad40b168d487cb6cd0d317816d7bf45dac980fc6b687a1f921505

See more details on using hashes here.

Supported by

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