Metadata-Version: 2.1
Name: pydelivengo
Version: 1.5
Summary: A lib to use MyDelivengo API
Home-page: https://github.com/alexandriagroup/pydelivengo
Author: Alicia FLOREZ
Author-email: alicflorez@gmail.com
License: MIT
Project-URL: Source, https://github.com/alexandriagroup/pydelivengo/archive/v1.5.tar.gz
Project-URL: Documentation, https://alexandriagroup.github.io/pydelivengo/
Project-URL: Travis, https://travis-ci.org/alexandriagroup/pydelivengo
Keywords: api mydelivengo python3 webservices
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Description-Content-Type: text/markdown
License-File: LICENSE

# pydelivengo 
[![Build Status](https://travis-ci.org/alexandriagroup/pydelivengo.svg?branch=master)](https://travis-ci.org/alexandriagroup/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

```python
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](http://www.assistance-mydelivengo.fr/api/documentation/) 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:

```python
import os
from base64 import decodebytes

with open(os.path.expanduser('path/test.pdf'), 'wb') as f:
    f.write(decodebytes(api_data.encode('ascii')))
```


