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.4.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for ziptimezone-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f1b1e8f0277f6f9ade06dfa52839cad855db895f970002beabbc6affd91c2eb |
|
MD5 | 1743d33f06cfb313be3ce59ba242f097 |
|
BLAKE2b-256 | c3a56c1ec95d3ba6278020823fcadab6a5e7edfa8b80bf62974c365991feb41a |