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

Uploaded Source

gaepytz-2011h.tar.gz (373.4 kB view details)

Uploaded Source

File details

Details for the file gaepytz-2011h.zip.

File metadata

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

File hashes

Hashes for gaepytz-2011h.zip
Algorithm Hash digest
SHA256 8b4df07ca7555ed5f590cf97553b6fb050f6809398c85114cb21e6ffdc021e63
MD5 0f130ef491509775b5ed8c5f62bf66fb
BLAKE2b-256 dfc8bf563d1b043e034bc9a1e7f6461761912cda963805ff14eb9f2e579c0dc4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gaepytz-2011h.tar.gz
Algorithm Hash digest
SHA256 d6e214fdc071c9a22234aed92ea763889501d0c000ee202b8a5493ef4390843b
MD5 b7abe173cd98b417fab3e91c1498cdd2
BLAKE2b-256 99de39ab9e14045842caa059687df480c5af1779b0cc83693b2e6fa78a06a5e2

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