Skip to content

sheaC42/pyPostcode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyPostcode

##Introduction

This is a Python library to request information from the PostcodeApi.nu API. This API allows you to search for Dutch addresses using zipcodes.

For more information about this API, please visit http://postcodeapi.nu

This library supports only the v2 api.

##Installation

###PyPI pip install pyPostcode

###Manually

pyPostcode consists of a single file (pyPostcode.py) that you can put in your python search path or in site-packages (or dist-packages depending on the platform) You can also simply run it by putting it in the same directory as you main script file or start a python interpreter in the same directory. pyPostcode works with Python 2.7.x (you're welcome to test other versions)

###API-key

The API can only be used when you have your own API-key. You can request this key by visiting: http://www.postcodeapi.nu/#pakketten

##Example

###Basic usage

Get the address by using the zipcode and the house number

#!/usr/bin/python

from pyPostcode import Api

postcodeapi = Api('{YOUR_API_KEY}') # Set your own API-key
result = postcodeapi.getaddress('1011AC', 154) # use address search
print result.street, result.house_number, result.town

###Result data

the following information can be gathered from the result:

##License

"PostcodeApi" is owned by Apiwise, see http://postcodeapi.nu for more information. I am in no way affiliated with PostcodeAPI or the Apiwise organization.

About

Python wrapper for the API of postcodeapi.nu

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%