Skip to main content

Probably the fastest Python package to convert longitude/latitude to timezone name

Project description

tzfpy PyPI

It's probably the fastest Python package to convert longitude/latitude to timezone name.

NOTE:

  1. This package use a simplified polygon data and not so accurate around borders.
  2. Rust use lazzy init, so first calling will be a little slow.
  3. Use about 40MB memory.

It's tested under Python 3.9+ but support 3.7+(noqa).

Usage

pip install tzfpy
>>> from tzfpy import get_tz, get_tzs
>>> get_tz(116.3883, 39.9289)
'Asia/Shanghai'
>>> get_tzs(87.4160, 44.0400)
['Asia/Shanghai', 'Asia/Urumqi']

Background

tzfpy was originally written in Go named tzf and use CGO compiled to .so to be used by Python. Since v0.11.0 it's rewritten in Rust built on PyO3 and tzf-rs, a tzf's Rust port.

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

tzfpy-0.12.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

tzfpy-0.12.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

tzfpy-0.12.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

tzfpy-0.12.1-cp311-none-win_amd64.whl (6.1 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

tzfpy-0.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

tzfpy-0.12.1-cp310-none-win_amd64.whl (6.1 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

tzfpy-0.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

tzfpy-0.12.1-cp39-none-win_amd64.whl (6.1 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

tzfpy-0.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

tzfpy-0.12.1-cp39-cp39-macosx_10_7_x86_64.whl (6.2 MB view hashes)

Uploaded CPython 3.9 macOS 10.7+ x86-64

tzfpy-0.12.1-cp38-none-win_amd64.whl (6.1 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

tzfpy-0.12.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

tzfpy-0.12.1-cp37-none-win_amd64.whl (6.1 MB view hashes)

Uploaded CPython 3.7 Windows x86-64

tzfpy-0.12.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

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