Skip to main content

Simple library for offline lookup of the timezone for a location.

Project description

GeoTZ v0.0.2a3

Docs: https://geotz.readthedocs.io/

This is a small library for looking up the timezone for a given country code and postal code / postal code prefix.

Compared to alternatives like geopy or pgeocode, it’s intended to be easier to use, less feature rich, and more lightweight.

It uses offline data from www.geonames.org to find the approximate location and then uses another library to convert that into a timezone.

Please read the LICENSE file for important information about using this library and the data contained within.

Motivation

  1. Easy to use. No API key or external API service required.

  2. Fast offline lookup.

  3. No downloads required; the necessary data comes bundled with the package.

  4. No network requests.

  5. I tried to keep the extra dependencies to a minimum.

  6. Data is loaded from disk on demand, so as to not use unnecessary memory.

Development

To run the build, there’s the GitHub actions workflows as well as the option to run locally.

For running the build locally, use pip install tox and the run tox in the repository base directory (or tox -p to run the build in parallel).

  1. Ensure you have tox installed e.g. by running pip install tox

  2. Extract data tox -e extract_data

  3. Run the build: tox

Project details


Download files

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

Source Distribution

geotz-0.0.2a3.tar.gz (16.7 MB view details)

Uploaded Source

Built Distribution

geotz-0.0.2a3-py3-none-any.whl (17.1 MB view details)

Uploaded Python 3

File details

Details for the file geotz-0.0.2a3.tar.gz.

File metadata

  • Download URL: geotz-0.0.2a3.tar.gz
  • Upload date:
  • Size: 16.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for geotz-0.0.2a3.tar.gz
Algorithm Hash digest
SHA256 b33233a65cb3affe5519c79b7d69ce5fbfedbe88497d6a84328c499f2d1e15bb
MD5 8f8cebf8721c32619e086a9918ff8acd
BLAKE2b-256 21f3be24d35698c2d0ac142663a893c311c3f30a26f7cafb651c61cc67271f11

See more details on using hashes here.

File details

Details for the file geotz-0.0.2a3-py3-none-any.whl.

File metadata

  • Download URL: geotz-0.0.2a3-py3-none-any.whl
  • Upload date:
  • Size: 17.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for geotz-0.0.2a3-py3-none-any.whl
Algorithm Hash digest
SHA256 115dcb540fefa725d70ec5bdc4eeeb90ceca5f9c2ccdeae49d69782c72c77ef9
MD5 6cbf0670b8ecb593e6af855428adc99a
BLAKE2b-256 de45f5a0d4f70358c47cfc7a9ceaa587a0bb01e2aacc7c155e6733de0a72d318

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