Skip to main content

A Python wrapper for using the PostNL locations SOAP API

Project description

A Python wrapper for using the PostNL locations SOAP API. You can find the source code here: python-postnl-locations.

https://travis-ci.org/maerteijn/python-postnl-locations.svg?branch=master Coverage

Compatibility

This package is depending on suds-jurko , a fully compatible version of the original package with some bug fixes and speed improvements, and has support for python3 as well. So this package depends on it (suds-py3 still has some compatibility issues).

Usage

To use this package follow these steps:

  1. Install this python package someway. (pip install postnl-locations)

  2. In your project, create a settings dictionary with at least the following parameters:

MY_SETTINGS = {
    # this is the testservice wsdl, see the PostNL documentation for the production settings
    'wsdl': "https://testservice.postnl.com/CIF_SB/LocationWebService/2_0/?wsdl",
    'countrycode': 'NL',
    'username': "my-username",
     # the password is SHA1 hashed
    'password': "my-sha1-hashed-password"
}
  1. Use the client as following:

from postnl.locations.client import Locations

locations = Locations(settings=MY_SETTINGS)
my_locations = locations.nearest_locations(postalcode="6821AD")

Take a look at the settings.py for more options.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

postnl-locations-0.1.2.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file postnl-locations-0.1.2.tar.gz.

File metadata

File hashes

Hashes for postnl-locations-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0ce40b60c25662c3c39a56a9207a8a672ea1eb076ef23ef3071bfcbaa7c5be07
MD5 99e52b26332d0e597864948e18e717d2
BLAKE2b-256 8d9e22c22bcb0167a8382fd5838ca75bdc584c5285b3ec90d496887167afdc5a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page