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
Examples on how to use it is are in:
example.pyfor a server using multiple calls to the API.
csv_example.pyfor a simpele download of a CSV from the API.
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:
in your code.
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, check
Ouito the question
- The client ID and secret are then available as
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:
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.
To release a new version of the library:
- Make sure the Changelog file is up to date.
- Update the version number in setup.py.
- Tag the code with git.
- Build and upload the package to PyPi:
python setup.py sdist upload