Skip to content

bayesimpact/python-emploi-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3a9553b · Feb 24, 2021

History

49 Commits
Feb 24, 2021
Jan 25, 2021
Jan 25, 2021
Apr 8, 2016
Feb 18, 2019
Feb 24, 2021
Apr 8, 2016
Feb 18, 2021
Apr 8, 2016
Apr 7, 2016
Feb 24, 2021

Repository files navigation

PyPI version

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 and Clé 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:

  • Make sure the Changelog file is up to date.
  • Update the version number in setup.py.
  • Tag the code with git.
  • CircleCI will take care of the deployment to PyPi