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 hashes)
Built Distribution
Close
Hashes for ziptimezone-1.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70fb5b59ac934682ba3cb718c3f04c31ea43cfbca3199f15bffcc1c76a0877f5 |
|
MD5 | bdb82c6781d23d672c2a4c5bf83d3b1b |
|
BLAKE2b-256 | 8f4fa2ce4a4f73b01afdc0305d1a67f8ac002d2bdccce0108c6f24485bcd34f5 |