Skip to main content

A package to convert ZIP codes to time zones and get geographic coordinates.

Project description

documentation status https://img.shields.io/pypi/wheel/ziptimezone.svg total PyPI downloads latest version on PyPI https://img.shields.io/badge/code%20style-black-000000.svg

This is a python package with US Zip Code convenience functions such as those listed in the examples below. It uses the geonames data, coupled with the timezonefinder package. It uses a mapping of the popular timezone regions in US, and returns the outputs accordingly.

Quick Guide:

pip install ziptimezone
import ziptimezone as zpt

# returns a tuple (42.377, -71.1256)
zpt.get_lat_long_for_zip('02138')

# returns 'Eastern' the timezone has been reduced to the more popular zones
# for United States Regions
zpt.get_timezone_by_zip('02138')

# returns a dictionary, {'02138': 'Eastern', '85260': 'Mountain'}
zpt.get_timezone_for_many_zips(['02138', '85260'])

# returns a a string, '02138 is ahead of 72201 by 1.00 hours."}
zpt.get_timezone_for_many_zips(['02138', '72201'])

For more refer to the Documentation.

Also check:

PyPI

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

ziptimezone-1.1.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

ziptimezone-1.1.2-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file ziptimezone-1.1.2.tar.gz.

File metadata

  • Download URL: ziptimezone-1.1.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.9 Windows/10

File hashes

Hashes for ziptimezone-1.1.2.tar.gz
Algorithm Hash digest
SHA256 5e22071c93d95931bd322f0b20274c1400a1a6aea416d631d32393927819be03
MD5 cfa2c2acf638e50e65107beedf1e7bde
BLAKE2b-256 10a732dea1caa6bf8a55be6b0aa3546e8b37a358edb2262c8b115efcb9c7f04e

See more details on using hashes here.

File details

Details for the file ziptimezone-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: ziptimezone-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.9 Windows/10

File hashes

Hashes for ziptimezone-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 70fb5b59ac934682ba3cb718c3f04c31ea43cfbca3199f15bffcc1c76a0877f5
MD5 bdb82c6781d23d672c2a4c5bf83d3b1b
BLAKE2b-256 8f4fa2ce4a4f73b01afdc0305d1a67f8ac002d2bdccce0108c6f24485bcd34f5

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