<commit_before>La Poste SDK
============

.. image:: https://travis-ci.org/geelweb/laposte-python-sdk.svg?branch=master
    :target: https://travis-ci.org/geelweb/laposte-python-sdk
.. image:: https://coveralls.io/repos/github/geelweb/laposte-python-sdk/badge.svg?branch=python3
    :target: https://coveralls.io/github/geelweb/laposte-python-sdk?branch=python3
.. image:: https://img.shields.io/badge/python-2.7%2C%20~3.3-blue.svg


LaPosteSDK is a Python client library to work with `La Poste API <https://developer.laposte.fr/products>`_

Installation
------------

.. code-block:: text

    pip install lapostesdk

Requirements
------------

* requests

Dev requirements

* responses

Configuration
-------------

.. code-block:: python

    from lapostesdk.laposteapi import LaPosteApi
    api = LaPosteApi(api_key='YourApiKey')

Test suite
----------

.. code-block:: text

    python -m unittest test

Apis
----

ControlAdresse
~~~~~~~~~~~~~~

The `ControlAdresse Api <https://developer.laposte.fr/products/controladresse/latest>`_

Address look up
^^^^^^^^^^^^^^^

.. code-block:: python

    response = api.controladresse.search('116 avenue du Président Kennedy 75220 Paris Cedex 16')

Address details
^^^^^^^^^^^^^^^

    adresse = api.controladresse.get('adresses/12280852')
    print adresse.codePostal

Suivi
~~~~~

The `Suivi Api <https://developer.laposte.fr/products/suivi/latest>`_

.. code-block:: python

    suivi = api.suivi.get('1111111111111')
    print suivi.status

<commit_msg>update coverall badge to track master [ci skip]<commit_after>La Poste SDK
============

.. image:: https://travis-ci.org/geelweb/laposte-python-sdk.svg?branch=master
    :target: https://travis-ci.org/geelweb/laposte-python-sdk
.. image:: https://coveralls.io/repos/github/geelweb/laposte-python-sdk/badge.svg?branch=master
    :target: https://coveralls.io/github/geelweb/laposte-python-sdk?branch=master
.. image:: https://img.shields.io/badge/python-2.7%2C%20~3.3-blue.svg


LaPosteSDK is a Python client library to work with `La Poste API <https://developer.laposte.fr/products>`_

Installation
------------

.. code-block:: text

    pip install lapostesdk

Requirements
------------

* requests

Dev requirements

* responses

Configuration
-------------

.. code-block:: python

    from lapostesdk.laposteapi import LaPosteApi
    api = LaPosteApi(api_key='YourApiKey')

Test suite
----------

.. code-block:: text

    python -m unittest test

Apis
----

ControlAdresse
~~~~~~~~~~~~~~

The `ControlAdresse Api <https://developer.laposte.fr/products/controladresse/latest>`_

Address look up
^^^^^^^^^^^^^^^

.. code-block:: python

    response = api.controladresse.search('116 avenue du Président Kennedy 75220 Paris Cedex 16')

Address details
^^^^^^^^^^^^^^^

    adresse = api.controladresse.get('adresses/12280852')
    print adresse.codePostal

Suivi
~~~~~

The `Suivi Api <https://developer.laposte.fr/products/suivi/latest>`_

.. code-block:: python

    suivi = api.suivi.get('1111111111111')
    print suivi.status


{'fraction_non_alphanumeric': 0.18828176431863067, 'fraction_numerical': 0.025674786043449638, 'mean_word_length': 3.442982456140351, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5669779', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1010, 'n_words': 191}