This Django app providers a pluggable postcode django rest framework endpoint. It currently only works for postcodes in The Netherlands.
- Currently supports the following services:
ApiWise
Webservices.nl
postcodeapi.nu
Status
Installation
pip install django_postcode_lookup
Usage
Add the following to your urls.py:
path('postcode-lookup/', include('django_postcode_lookup.urls')),
Add a setting with the required backend
Webservices:
POSTCODE_LOOKUP = {
'default': {
'backend': 'django_postcode_lookup.backends.Webservices',
'OPTIONS': {
'username': 'someuser',
'password': 'somepassword',
}
}
}
ApiWise:
POSTCODE_LOOKUP = {
'default': {
'backend': 'django_postcode_lookup.backends.ApiWise',
'OPTIONS': {
'api_key': 'somekey',
}
}
}
postcodeapi.nu:
POSTCODE_LOOKUP = {
'default': {
'backend': 'django_postcode_lookup.backends.PostcodeApiNu',
'OPTIONS': {
'api_key': 'somekey',
'base_url': 'https://somebaseurl.com',
}
}
}
To offer some form of protection to the api endpoint for usage by others a valid csrf token is required.
Release files for django-postcode-lookup 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-postcode-lookup-1.0.1.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_postcode_lookup-1.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 18.1 kB
Release files / django-postcode-lookup-1.0.1.tar.gz
| Download URL | django-postcode-lookup-1.0.1.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5799645156a8b6e3a6000c58575a05acb0ca312190602097da79da7fe1bcfcf4
|
|
BLAKE2b-256 checksum How to use checksums |
a9f459732a32ccb77b45c4b45af0418ec10493bdcced81357629383d43c5d34b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / django_postcode_lookup-1.0.1-py2.py3-none-any.whl
| Download URL | django_postcode_lookup-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e5f5bce3f54853000c43903e1d839990c42ffe4c5e0a9083d03de21a4728ed5d
|
|
BLAKE2b-256 checksum How to use checksums |
8d5bcc1a13d0c5df0e426df6543d4c659041416e42528e10642b3511829002b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|