django-postcode-lookup 1.0.1

Creator: codyrutscher

Last updated:

Add to Cart

Description:

djangopostcodelookup 1.0.1

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.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.