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. Latest release includes dependency fixes and documentation updates.
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.calculate_time_difference(['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.6.tar.gz
(7.1 kB
view details)
Built Distribution
File details
Details for the file ziptimezone-1.1.6.tar.gz
.
File metadata
- Download URL: ziptimezone-1.1.6.tar.gz
- Upload date:
- Size: 7.1 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 | 2f365ce40248065d6522442bdd9764881013da80c3d7d81d0e9a694edec0a499 |
|
MD5 | edfd99ae69c0eb0832695d2b3378e0cc |
|
BLAKE2b-256 | c9802f73f4257b3197db34f6a5ef1ffcea29051a3b12c275f023247ad84646e5 |
File details
Details for the file ziptimezone-1.1.6-py3-none-any.whl
.
File metadata
- Download URL: ziptimezone-1.1.6-py3-none-any.whl
- Upload date:
- Size: 8.7 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 | 096a0d4a2885a6cf019d784224006bedd8b88e0e26fa06bed6bf49b71a94147d |
|
MD5 | bc41be47440878161f480cfb36937cf3 |
|
BLAKE2b-256 | c7cb91c3e872a72a7e0a7615d018485320a799eb52494d337b4db15d226023ff |