A high-level Python SDK to interact with the France Travail API.
python3 venv .france-travail-api
source .france-travail-api/bin/activate
pip install france-travail-apiThe SDK handles the OAuth2 Client Credentials Grant flow to authenticate with the API.
Get your API credentials (FRANCE_TRAVAIL_CLIENT_ID and FRANCE_TRAVAIL_CLIENT_SECRET) from the France Travail API developer portal.
from france_travail_api.client import FranceTravailClient
from france_travail_api.auth.scope import Scope
with FranceTravailClient(
client_id="your_id",
client_secret="your_secret",
scopes=[Scope.OFFRES]
) as client:
job_offers =client.offres.search(mots_cles="developpeur")You need to have curl and uv installed on your system.
Then run the following command : curl -sSL https://raw.githubusercontent.com/cmnemoi/france-travail-api/main/clone-and-install | bash
You can run tests with make test.
To run integration tests, you need to set FRANCE_TRAVAIL_CLIENT_ID and FRANCE_TRAVAIL_CLIENT_SECRET environment variables.
The source code of this repository is licensed under the Apache License 2.0.