Emploi Store Dev is a platform setup by P么le Emploi, the French unemployment agency, to share their public data.
This is a Python client library for their API.
The library is in emploi_store
and works both in Python 2 and Python 3.
Usage information and required environment variables is documented in the
library's docstring.
Examples on how to use it is are in:
-
example.py
for a server using multiple calls to the API. -
csv_example.py
for a simpele download of a CSV from the API.
Installation
The library is released on PyPi thus can be installed with pip:
pip install python-emploi-store
That's all, then you just need to use:
import emploi_store
in your code.
API Key
This client library doesn't provide direct access to the data. To use it, you need to get a client ID and client secret from Emploi Store Dev.
As documented on their website you need to:
- Sign-in or create a new account
- Go to your dashboard
- Add an application and agree to the terms of use
- Subscribe to the Infotravail v1 API by clicking
DEMANDE D'ACC脠S
and selecting your application. - The client ID and secret are then available as
Identifiant
andCl茅 secr猫te
For more information about the Pole-Emploi API subscription, read its documentation.
Development
If you want to contribute, make sure to send us a Pull Request with tests. To setup a test environment we generally use Docker to isolate the tests.
- In a terminal, start a container and set the dev environment. Note that you need one environment for Python 2 and another for Python 3. You can have several ran in parallel if needed.
docker run --rm -it -v $(pwd):/work/:ro -w /work/ python:3 bash
pip install .[dev]
- Run the tests, and automatically re-run them when files are changed:
nosetests --with-watch
-
Now you can edit the files and monitor the terminal.
-
To stop watching the tests, hit Ctrl-C in the terminal. Then to exit the Docker container, hit Ctrl-D.
Release
To release a new version of the library: