A package to convert ZIP codes to time zones and get geographic coordinates.
Project description
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:
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
ziptimezone-1.1.2.tar.gz
(7.0 kB
view details)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e22071c93d95931bd322f0b20274c1400a1a6aea416d631d32393927819be03 |
|
MD5 | cfa2c2acf638e50e65107beedf1e7bde |
|
BLAKE2b-256 | 10a732dea1caa6bf8a55be6b0aa3546e8b37a358edb2262c8b115efcb9c7f04e |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70fb5b59ac934682ba3cb718c3f04c31ea43cfbca3199f15bffcc1c76a0877f5 |
|
MD5 | bdb82c6781d23d672c2a4c5bf83d3b1b |
|
BLAKE2b-256 | 8f4fa2ce4a4f73b01afdc0305d1a67f8ac002d2bdccce0108c6f24485bcd34f5 |