python package for finding the timezone of any point on earth (coordinates) offline
Project description
This is a python package providing offline timezone lookups for WGS84 coordinates. In comparison to other alternatives this package aims at maximum accuracy around timezone borders (no geometry simplifications) while offering fast lookup performance and compatibility with many (Python) runtime environments. It combines preprocessed polygon data, H3-based spatial shortcuts, and optional acceleration via Numba or a clang-backed point-in-polygon routine.
Notice: Looking for maintainers. Reach out if you want to contribute!
Quick Guide
It is recommended to install it together with the optional Numba package for increased performance:
pip install timezonefinder[numba]
from timezonefinder import timezone_at
tz = timezone_at(lng=13.358, lat=52.5061) # 'Europe/Paris'
# For thread safety, increased performance and control, re-use an instance:
from timezonefinder import TimezoneFinder
tf = TimezoneFinder(in_memory=True) # reuse
query_points = [(13.358, 52.5061), ...]
for lng, lat in query_points:
tz = tf.timezone_at(lng=lng, lat=lat) # 'Europe/Paris'
Note: This library uses the full original timezone dataset with all >440 timezone names, providing full localization capabilities and historical timezone accuracy. For applications that prefer a smaller memory footprint, the reduced “timezones-now” dataset is available via the parse_data.sh script (cf. Documentation).
Alternative: Need maximum speed at the cost of accuracy? Check out tzfpy - a fast and lightweight alternative based on Rust.
References
LICENSE
timezonefinder is licensed under the MIT license.
The data is licensed under the ODbL license, following the base dataset from evansiroky/timezone-boundary-builder.
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 Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timezonefinder-8.2.1.tar.gz.
File metadata
- Download URL: timezonefinder-8.2.1.tar.gz
- Upload date:
- Size: 53.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16a8418fc73651b5491af891cf23973b967525ab6f4c8111c27c90fc6e22112d
|
|
| MD5 |
0899e31014e73c2fac540cc8c0c1ff0f
|
|
| BLAKE2b-256 |
61140690fdab11bc306d66d109d5a2ee61fbd2b61755aa174c08e123c9e1e949
|
File details
Details for the file timezonefinder-8.2.1-cp39-abi3-musllinux_1_1_x86_64.whl.
File metadata
- Download URL: timezonefinder-8.2.1-cp39-abi3-musllinux_1_1_x86_64.whl
- Upload date:
- Size: 53.8 MB
- Tags: CPython 3.9+, musllinux: musl 1.1+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d46d82c6a821086a36bf2f8c57c1501dd2cf82f54ea647aca3901d33564ccf5
|
|
| MD5 |
f77094ec57bcf52a068cb65f8173151a
|
|
| BLAKE2b-256 |
142853f198a15527f180fd48dc83191605de8cc7e29fb5eb7228e94796b950c1
|
File details
Details for the file timezonefinder-8.2.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: timezonefinder-8.2.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 53.8 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0dcaa33de1a5dad33db1dd36bead831c19d1865f1dc8c2e14361734293e7727
|
|
| MD5 |
31c1f7d7ed500d77d5271194f8278296
|
|
| BLAKE2b-256 |
ea72f2caee4b18561db7cdca16cbbddd0dd49067f57ff98093f5aee4da19f964
|