Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imicknl/python-postnl-api
Python wrapper for the PostNL API, a way to track packages using their online portal.
https://github.com/imicknl/python-postnl-api
postnl python
Last synced: 3 months ago
JSON representation
Python wrapper for the PostNL API, a way to track packages using their online portal.
- Host: GitHub
- URL: https://github.com/imicknl/python-postnl-api
- Owner: iMicknl
- License: mit
- Created: 2017-10-21T21:32:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-13T10:02:27.000Z (about 5 years ago)
- Last Synced: 2024-10-06T13:28:29.384Z (4 months ago)
- Topics: postnl, python
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 21
- Watchers: 12
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](http://jouw.postnl.nl) credentials to use the API.## Quick test
When installed:
```python
python -m postnl_api.test_postnl_api USERNAME PASSWORD
```Or running directly:
```python
test_postnl_api.py USERNAME PASSWORD
```## Code Example
```python
from postnl_api import PostNL_API# Login using your jouw.postnl.nl credentials
postnl = PostNL_API('[email protected]', '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](https://imick.nl/reverse-engineering-the-postnl-consumer-api/) describes the process of figuring out the API endpoints and shows how this can be done for other API's.## Changelog
See the [CHANGELOG](./CHANGELOG.md) file.## Contributors
- [@eavanvalkenburg](https://github.com/eavanvalkenburg)
- [@peternijssen](https://github.com/peternijssen)
- [@IcyPalm](https://github.com/IcyPalm)
- [@0x00-0xFF](https://github.com/0x00-0xFF)## License
MIT