Simple library for offline lookup of the timezone for a location.
Project description
GeoTZ v0.0.2a4
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
Easy to use. No API key or external API service required.
Fast offline lookup.
No downloads required; the necessary data comes bundled with the package.
No network requests.
I tried to keep the extra dependencies to a minimum.
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).
Ensure you have tox installed e.g. by running pip install tox
Extract data tox -e extract_data
Run the build: tox
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file geotz-0.0.2a4.tar.gz
.
File metadata
- Download URL: geotz-0.0.2a4.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e287f4a88ef1e32d188d5e61e4ce7a53c0554a9156e7702d1dab43f29983a01b |
|
MD5 | c890c2bbdfa07c597f9776a1d789650c |
|
BLAKE2b-256 | 7ed977927c975630d3a9cdd295e823d04d67519940fbad73fc1089513ca544e5 |
File details
Details for the file geotz-0.0.2a4-py3-none-any.whl
.
File metadata
- Download URL: geotz-0.0.2a4-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67a5fd81872f45204c3b57bc906647fc8d72d6f6b6f256ed6ed62d7919951d3 |
|
MD5 | 0c63628909aad4f16c0a6f23b0b79be7 |
|
BLAKE2b-256 | 9074da9417415d1eb0547696541f046b6ffca757fdefe340c61b3c0ed53de182 |