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.5.tar.gz
(7.1 kB
view details)
Built Distribution
File details
Details for the file ziptimezone-1.1.5.tar.gz
.
File metadata
- Download URL: ziptimezone-1.1.5.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 | 1b872726b0eea94cdf12c3a9cd72819ee4d6c89c2838c8a357e672140ce077d5 |
|
MD5 | 19bc5ef005841c69967fbc2fd55ca37c |
|
BLAKE2b-256 | 54ed6752696576287e4a33eb253f89d01a84e96c76576f2fe33411ed945e630a |
File details
Details for the file ziptimezone-1.1.5-py3-none-any.whl
.
File metadata
- Download URL: ziptimezone-1.1.5-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 | a0cedbc30c5ef3e475523810556c7ff7d4a41a2549f51af33b3ba43513ec2348 |
|
MD5 | 17702b71d7dfc540dfe38c72a573a389 |
|
BLAKE2b-256 | d7f8ab6c2a0716c214bfed60c20b4e32f2ba9cef49bb93d1164e7c70da3e6876 |