pyzipcode


Namepyzipcode JSON
Version 1.0 PyPI version JSON
download
home_pageUNKNOWN
Summaryquery zip codes and location data
upload_time2016-01-20 22:49:59
maintainerNone
docs_urlNone
authorNathan Van Gheem
requires_pythonNone
licenseGPL
keywords zip code distance
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
============

This package will allow you to get zip code information. The data used in this
package is retrieved from
http://pablotron.org/files/zipcodes-csv-10-Aug-2004.zip

pyzipcode uses a local sqlite database to run. You can replace it with your own
other storage mechanism with a little effort.

Here is some basic usage..

	>>> from pyzipcode import ZipCodeDatabase
	>>> zcdb = ZipCodeDatabase()
	>>> zipcode = zcdb[54115]
	>>> zipcode.zip
	u'54115'
	>>> zipcode.city
	u'De Pere'
	>>> zipcode.state
	u'WI'
	>>> zipcode.longitude
	-88.078959999999995
	>>> zipcode.latitude
	44.42042
	>>> zipcode.timezone
	-6


Search zip codes...

	>>> from pyzipcode import ZipCodeDatabase
	>>> zcdb = ZipCodeDatabase()
	>>> len(zcdb.find_zip(city="Oshkosh"))
	7


Get a list of zipcodes around a radius of a zipcode

	>>> from pyzipcode import ZipCodeDatabase
	>>> zcdb = ZipCodeDatabase()
	>>> [z.zip for z in zcdb.get_zipcodes_around_radius('54901', 10)]
	[u'54901', u'54902', u'54903', u'54904', u'54906', u'54927', u'54952', u'54956', u'54957', u'54979', u'54985']


ChangeLog
=========

1.0 (2016-01-20)
----------------

* Fix import code so that it is not run when the module is imported (for
  example, when building Sphinx API Documentation).
* Rename the import.py module to import_zipcode.py because `import` is a
  reserved Python keyword.
* Document the import_zipcode module.

0.4
---

* updated to use maxmind database http://www.maxmind.com/app/postalcode

* now also keeps timezone and dst values

* longitude and latitude is now contains negative numbers


0.3
---

* use strings instead of integer for storing zip codes since zip codes can start
  with a Zero.


0.2
---

* catch sqlite db file reading errors and keep trying in case
  another process is trying to access the file at the same time.


0.1
---

* initial release
            

Raw data

            {
    "maintainer": null, 
    "docs_url": null, 
    "requires_python": null, 
    "maintainer_email": null, 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "zip code distance", 
    "upload_time": "2016-01-20 22:49:59", 
    "author": "Nathan Van Gheem", 
    "home_page": "UNKNOWN", 
    "download_url": "https://pypi.python.org/packages/8f/aa/4d8576fd3559d3cdc289f3f00c048d2d628643bf0b5a613a4f74bbe3af65/pyzipcode-1.0.zip", 
    "platform": "UNKNOWN", 
    "version": "1.0", 
    "cheesecake_documentation_id": null, 
    "description": "Introduction\n============\n\nThis package will allow you to get zip code information. The data used in this\npackage is retrieved from\nhttp://pablotron.org/files/zipcodes-csv-10-Aug-2004.zip\n\npyzipcode uses a local sqlite database to run. You can replace it with your own\nother storage mechanism with a little effort.\n\nHere is some basic usage..\n\n\t>>> from pyzipcode import ZipCodeDatabase\n\t>>> zcdb = ZipCodeDatabase()\n\t>>> zipcode = zcdb[54115]\n\t>>> zipcode.zip\n\tu'54115'\n\t>>> zipcode.city\n\tu'De Pere'\n\t>>> zipcode.state\n\tu'WI'\n\t>>> zipcode.longitude\n\t-88.078959999999995\n\t>>> zipcode.latitude\n\t44.42042\n\t>>> zipcode.timezone\n\t-6\n\n\nSearch zip codes...\n\n\t>>> from pyzipcode import ZipCodeDatabase\n\t>>> zcdb = ZipCodeDatabase()\n\t>>> len(zcdb.find_zip(city=\"Oshkosh\"))\n\t7\n\n\nGet a list of zipcodes around a radius of a zipcode\n\n\t>>> from pyzipcode import ZipCodeDatabase\n\t>>> zcdb = ZipCodeDatabase()\n\t>>> [z.zip for z in zcdb.get_zipcodes_around_radius('54901', 10)]\n\t[u'54901', u'54902', u'54903', u'54904', u'54906', u'54927', u'54952', u'54956', u'54957', u'54979', u'54985']\n\n\nChangeLog\n=========\n\n1.0 (2016-01-20)\n----------------\n\n* Fix import code so that it is not run when the module is imported (for\n  example, when building Sphinx API Documentation).\n* Rename the import.py module to import_zipcode.py because `import` is a\n  reserved Python keyword.\n* Document the import_zipcode module.\n\n0.4\n---\n\n* updated to use maxmind database http://www.maxmind.com/app/postalcode\n\n* now also keeps timezone and dst values\n\n* longitude and latitude is now contains negative numbers\n\n\n0.3\n---\n\n* use strings instead of integer for storing zip codes since zip codes can start\n  with a Zero.\n\n\n0.2\n---\n\n* catch sqlite db file reading errors and keep trying in case\n  another process is trying to access the file at the same time.\n\n\n0.1\n---\n\n* initial release", 
    "lcname": "pyzipcode", 
    "bugtrack_url": null, 
    "github": false, 
    "name": "pyzipcode", 
    "license": "GPL", 
    "summary": "query zip codes and location data", 
    "split_keywords": [
        "zip", 
        "code", 
        "distance"
    ], 
    "author_email": "vangheem@gmail.com", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2016-01-20T22:49:59", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/8f/aa/4d8576fd3559d3cdc289f3f00c048d2d628643bf0b5a613a4f74bbe3af65/pyzipcode-1.0.zip", 
            "md5_digest": "9de4c6c6f802dc3ac546eec5ea8d11ad", 
            "downloads": 495, 
            "filename": "pyzipcode-1.0.zip", 
            "packagetype": "sdist", 
            "path": "8f/aa/4d8576fd3559d3cdc289f3f00c048d2d628643bf0b5a613a4f74bbe3af65/pyzipcode-1.0.zip", 
            "size": 1934396
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}