A simple python package for dealing with zip codes in python.
Project description
- Simple package for dealing with zip codes in python.
>>> import zipcode >>> >>> myzip = zipcode.isequal('44102') >>> myzip.state #=> 'OH' >>> myzip.city #=> 'Cleveland' >>> >>> myzip.to_dict() #=> {'zip_type': u'STANDARD', 'city': u'CLEVELAND', 'population': u'27699', 'zip': u'44102', 'yaxis': u'-0.74', 'location_text': u'Cleveland, OH', 'country': u'NA', 'notes': u'', 'lon': -81.67, 'tax_returns_filed': u'17409', 'state': u'OH', 'z axis': u'0.66', 'location': u'NA-US-OH-CLEVELAND', 'xaxis': u'0.1', 'lat': 41.47, 'wages': u'408225500', 'decommisioned': u'FALSE', 'location_type': u'PRIMARY', 'world_region': u'NA'} >>> >>> #all keys in the dictionary can be fetched with dot notation. >>> >>> zipcode.islike('00') #=> list of Zip objects that begin with given prefix. >>> >>> cbus = (39.98, -82.98) >>> zipcode.isinradius(cbus, 20) #=> list of all zip code objects within 20 miles of 'cbus'
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
zipcode-1.7.0.tar.gz
(1.6 MB
view details)
Built Distribution
File details
Details for the file zipcode-1.7.0.tar.gz
.
File metadata
- Download URL: zipcode-1.7.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e51c68fd69fefb43333cf44b32cf03e0a1af55cd9bca3a96526fd375fa9bd0a4
|
|
MD5 |
50720ab67aa312754c4c7b1a117ab7a2
|
|
BLAKE2b-256 |
4e0bf955f30b715e359de3a13d8d467ee5733ec33d777e9e78b41b1e5b9befbe
|
File details
Details for the file zipcode-1.7.0-py2.py3-none-any.whl
.
File metadata
- Download URL: zipcode-1.7.0-py2.py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
a239d34af06f3fd65fa8a3b8b1c04cb992c45089c948ad8e54499acccbc95d65
|
|
MD5 |
db8dec5b205dfdd963fb762852a34366
|
|
BLAKE2b-256 |
bcc5590eeb45cd32f763819af0a232a8b5b77b3b81a14bc2cbe3d286b2b8bbea
|