Skip to main content

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for zipcodeignoresamethread, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size zipcodeignoresamethread-0.1.0-py2.py3-none-any.whl (1.6 MB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size zipcodeignoresamethread-0.1.0.tar.gz (1.6 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page