python-postnl-api
(Unofficial) Python wrapper for the PostNL API (Dutch Postal Services), which can be used to track packages and letter deliveries. You can use your jouw.postnl.nl credentials to use the API.
Quick test
When installed:
python -m postnl_api.test_postnl_api USERNAME PASSWORD
Or running directly:
test_postnl_api.py USERNAME PASSWORD
Code Example
from postnl_api import PostNL_API
# Login using your jouw.postnl.nl credentials
postnl = PostNL_API('email@domain.com', 'password')
# Retrieve relevant incoming packages
print("Getting relevant deliveries")
rel_deliveries = postnl.get_relevant_deliveries()
for delivery in rel_deliveries:
print(delivery)
# Retrieve all incoming packages
print("Getting all deliveries")
all_deliveries = postnl.get_deliveries()
for delivery in all_deliveries:
print(delivery)
# Retrieve sent packages
print("Getting all distributions (sent packages)")
distributions = postnl.get_distributions()
for distribution in distributions:
print(distribution)
# Retrieve incoming letters
print("Getting all letters, if that function is turned on")
letters = postnl.get_letters()
for letter in letters:
print(letter)
Miscellaneous
This blogpost describes the process of figuring out the API endpoints and shows how this can be done for other API's.
Changelog
See the CHANGELOG file.
Contributors
License
MIT
Metadata
Release files for postnl-api 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| postnl_api-1.2.3.tar.gz | 4.7 kB | Without provenance | Details for postnl_api-1.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| postnl_api-1.2.3-py3-none-any.whl | Python 3 | none | any | Details for postnl_api-1.2.3-py3-none-any.whl |
Total release size: 11.7 kB
Release files / postnl_api-1.2.3.tar.gz
| Download URL | postnl_api-1.2.3.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eac33d40e0f35783139da2697a489b73ab37e1463b8b09c859a80952cc4af8ec
|
|
BLAKE2b-256 checksum How to use checksums |
7c0bcad85d5112107feb0e558510dae0bdbe90075c3b0ec0d926b2f4d55a5abe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Release files / postnl_api-1.2.3-py3-none-any.whl
| Download URL | postnl_api-1.2.3-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4e218ff03d7931cb2fe57ace97b6e008de85373a5bacd1b6e531cfd52d7a7c8
|
|
BLAKE2b-256 checksum How to use checksums |
e3113f8c35b529f2fb788a3e4649c2824af23ceab8b2df3fe4fa762c8aa9bfae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.4
|
Security for postnl-api 1.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.