Unofficial Python API for Odyssee
Project description
Odyssee API
Provides an unofficial API for the Odyssee platform, allowing users to access and interact with their data programmatically.
Features
- get information about candidates
- get information about committee members
- get information about institutions
- get keywords
- assign applications to committee members
- get reports from committee members
- provide decision on each candidate after the first round of evaluation
Installation
pip install odysseeapi
Getting the authentication token
- Go to the Odyssee platform using Chrome
- Open the developer tools (F12 or right-click and select "Inspect")
- Go to the "Network" tab
- Refresh the page
- Look for a request
- Click on the request and go to the "Headers" tab
- Look for the "Authorization" header and copy its value (it should start with "Bearer")
- Copy the token and use it in your code to authenticate with the API
Note that the authentication uses both cookies and a bearer token, so you need to provide both to access the API. The API automatically handles the cookie (using browsercookie), so you only need to provide the bearer token.
Note that the token is valid for a limited time, so you may need to repeat this process periodically to obtain a new token.
Minimal example
from odysseeapi.Odyssee import Odyssee
numposte = "123456"
token = """eyJhbGciOiJSUzI1N... (token value) ..."""
# Initialize the API client with the numposte, token and use_cache set to True
# setting use_cache to False forces the API client to fetch fresh data from the server for each request, while setting it to True allows the client to use cached data if available
odyssee = Odyssee(numposte, token, True)
candidates = odyssee.get_candidates()
print(candidates)
rapporteurs = odyssee.get_committee_members()
print(rapporteurs)
etablissements = odyssee.get_institutions()
print(etablissements)
keywords = odyssee.get_keywords()
print(keywords)
candidates_with_details = odyssee.get_candidates_with_details()
print(candidates_with_details)
# odyssee.assign_jury_members_to_candidate("f1e2d3c4-b5a6-4789-9876-543210fedcba", "98765432-10fe-dcba-9876-543210fedcba", "abcd1234-5678-90ef-ghij-klmnopqrstuv")
# Download the reports of the committee members for the candidates in the specified directory
odyssee.downloadReports("rapportsOdyssee")
# A l'issue de la première réunion du jury, enregistrer l'avis pour chaque candidat et les résultats du vote
# odyssee.opinion_for_interview("f1e2d3c4-b5a6-4789-9876-543210fedcba", "A", "Motif audition", 16, 16, 0, 0, 16, 0)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file odysseeapi-0.1.0.tar.gz.
File metadata
- Download URL: odysseeapi-0.1.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ff18c18aa651891df73348b341b820372d8127cd4509dead7a811fbcc85e8e3
|
|
| MD5 |
7353198720a82a6c8ca0e0f8c21aff49
|
|
| BLAKE2b-256 |
2573e0db296814c8ee7649ba9153408dea4c50302967037322ee71ff7021fe67
|
File details
Details for the file odysseeapi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: odysseeapi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ada9cba114efe6cccfc31761997177f03074fc3091d37165a0191991f1ef4fc3
|
|
| MD5 |
68d148633b80bfdf546f77eec5a07610
|
|
| BLAKE2b-256 |
44cf930829fb8d97b34f70c938c8ded97c183386c51cdf4f35137b64d94f0dd9
|