A lib to use MyDelivengo API
Project description
pydelivengo
pydelivengo is a Python library using the MyDelivengo API
Documentation
PyDelivengo : https://alexandriagroup.github.io/pydelivengo/
MyDelivengo (La Poste API documentation) : http://www.assistance-mydelivengo.fr/api/
You can find the list of parameters for each function into this documentation.
How to use
api = PyDelivengo(api_authorization="your_mydelivengo_api_key")
api.get_user_info() # Get your user info
api.get_envois() # get all your "envois"
api.get_pli(11437479, print_pdf=True) # Get the "pli" with ID 11437479 and generate PDF to print
api.get_depots(params={'date[from]':'30/11/2017'}) # Get the "depots" from November 30th
Looks to MyDelivengo documentation to see all parameters.
Tools
Decode and save PDF from API
An example for decode and save the Base64 Encoded String return by the MyDelivengo API:
import os
from base64 import decodebytes
with open(os.path.expanduser('path/test.pdf'), 'wb') as f:
f.write(decodebytes(api_data.encode('ascii')))
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
pydelivengo-1.6.tar.gz
(4.4 kB
view details)
Built Distribution
File details
Details for the file pydelivengo-1.6.tar.gz
.
File metadata
- Download URL: pydelivengo-1.6.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a71f1560d22e9c2d2078f7e326c3d5c4b34dd13a7ef63beb66f72ce2d26ae716 |
|
MD5 | 2e70b9029bbaabd09434fa7c7b4d8f4f |
|
BLAKE2b-256 | fe1ab9a9a20cfe65053870db98a17a6dfb47c591b12e683b286f95f3fbb2b2d2 |
File details
Details for the file pydelivengo-1.6-py3-none-any.whl
.
File metadata
- Download URL: pydelivengo-1.6-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0563baf4eb99a413c0e187c6d130269e82db0421609c60af2a158724ad544e |
|
MD5 | 84893d6a6d9fcb944f4d8715d2ee3301 |
|
BLAKE2b-256 | 55ce9967b98b8ae09c8dd4b1e31a0ebc767251a0f47d221f1a7175080de7240e |