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

Uploaded Source

gaepytz-2011b.tar.gz (390.4 kB view details)

Uploaded Source

File details

Details for the file gaepytz-2011b.zip.

File metadata

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

File hashes

Hashes for gaepytz-2011b.zip
Algorithm Hash digest
SHA256 fdadd957a40bd6d3facb91446779108bebd9a19e7eeda9a44a7b445ba3cd8ea9
MD5 0c06043f69eeea25ecd93d7fb56a0c95
BLAKE2b-256 761905b639d7150bbbfd5497f77a570fdbd900d3ca6ad7e9523a703cd9bb176b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gaepytz-2011b.tar.gz
Algorithm Hash digest
SHA256 3e18b43480b8e332beb72b8b5c42effc7998f1b65cdcd96e641d8504804e8c32
MD5 924245d4ebb7d91f0d531cdbb65195a6
BLAKE2b-256 ad8d082d4c83a06fed1dbec355fe98401ff97b17502c75fd67257ea428d3cd33

See more details on using hashes here.

Supported by

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