A simple python package for dealing with zip codes in python.
Project description
Simple package for dealing with zip codes in python. This is a fork from the package zipcode (https://github.com/buckmaxwell/zipcode) created to ignore checking if the sql object created is in the same thread as the current.
Full documentation at https://pythonhosted.org/zipcode
>>> 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
Built Distribution
Close
Hashes for zipcodeignoresamethread-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | affdb0799120c6aab63fc181de56dad8f6dbdbaca20567225baf5e95a7b23ec1 |
|
MD5 | b65d2a1000b27599e7b33b848105e614 |
|
BLAKE2b-256 | e74bcef6460aadab9d002b72ae68bd0fa97992826889682e1bd03f35460cd44e |
Close
Hashes for zipcodeignoresamethread-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6caedee3ecfc548d1fed1b0c74aa1762db831b79afbc0b36e73c1f0588ea0a35 |
|
MD5 | 1276b2bb3e504289fa0fd40c62d414ba |
|
BLAKE2b-256 | 61b6775c4a61bb2616cc25dd37cc580b056a166702691c14f3fb768cd62e5c4e |