Skip to content

Commit d7e02e0

Browse files
author
Stefan Jansen
committed
Version 0.3 (default to v2 api)
1 parent 595d753 commit d7e02e0

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This API allows you to search for Dutch addresses using zipcodes.
88

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

11-
This library supports both the v1 and the v2 api, defaulting to v1 for now.
11+
This library supports only the v2 api, defaulting to v2.
1212

1313

1414
##Installation
@@ -25,7 +25,7 @@ pyPostcode works with Python 2.7.x (you're welcome to test other versions)
2525
###API-key
2626

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

3030

3131
##Example
@@ -40,8 +40,6 @@ Get the address by using the zipcode and the house number
4040
from pyPostcode import Api
4141

4242
postcodeapi = Api('{YOUR_API_KEY}') # Set your own API-key
43-
# if you want to use the v2 api, say
44-
postcodeapi = Api('{YOUR_API_KEY}', (2, 0, 0))
4543
result = postcodeapi.getaddress('1011AC', 154) # use address search
4644
print result.street, result.house_number, result.town
4745
```
@@ -63,8 +61,8 @@ the following information can be gathered from the result:
6361

6462
##License
6563

66-
"PostcodeApi" is owned by freshheads, see http://postcodeapi.nu and http://freshheads.com for more information.
67-
I am in no way affiliated with PostcodeAPI or the freshheads organization.
64+
"PostcodeApi" is owned by Apiwise, see http://postcodeapi.nu for more information.
65+
I am in no way affiliated with PostcodeAPI or the Apiwise organization.
6866

6967
[Rijksdriehoek]: http://nl.wikipedia.org/wiki/Rijksdriehoekscoördinaten
7068
[Trigonometrical]: http://en.wikipedia.org/wiki/Triangulation_station

pyPostcode/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import logging
1414

1515

16-
__version__ = '0.1'
16+
__version__ = '0.3'
1717

1818

1919
class pyPostcodeException(Exception):
@@ -25,7 +25,7 @@ def __init__(self, id, message):
2525

2626
class Api(object):
2727

28-
def __init__(self, api_key, api_version=(1, 0, 0)):
28+
def __init__(self, api_key, api_version=(2, 0, 0)):
2929
if api_key is None or api_key is '':
3030
raise pyPostcodeException(
3131
0, "Please request an api key on http://postcodeapi.nu")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
setup(
33
name = 'pyPostcode',
44
packages = ['pyPostcode'],
5-
version = '0.2',
5+
version = '0.3',
66
description = 'Request information about Dutch addresses from the PostcodeApi.nu API',
77
author = 'Stefan Jansen',
88
author_email = 'stefan@steffex.net',

0 commit comments

Comments
 (0)