Skip to main content

Unofficial Python API for Odyssee

Project description

PyPI Version Downloads

Odyssee API

Provides an unofficial API for the Odyssee platform, allowing users to access and interact with their data programmatically.

Features

  • download applications of candidates
  • get information about candidates
  • get information about committee members
  • get information about institutions
  • get keywords
  • assign applications to committee members
  • download reports from committee members
  • provide decision on each candidate after the first round of evaluation

Installation

pip install odysseeapi

Getting the authentication token

  1. Go to the Odyssee platform using Chrome
  2. Open the developer tools (F12 or right-click and select "Inspect")
  3. Go to the "Network" tab
  4. Refresh the page
  5. 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")
  6. 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.

image

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)

# Download the applications of the candidates in the specified directory
odyssee.download_applications('dossiers_candidats')

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("rapports_odyssee")

# 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

odysseeapi-0.2.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

odysseeapi-0.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file odysseeapi-0.2.0.tar.gz.

File metadata

  • Download URL: odysseeapi-0.2.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for odysseeapi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9cdf375de2e7fc1f19b09d861a62d1237aa46478a038b208f0414a546c64eb20
MD5 b1e9c1eb8999b04bfed29f8cad703232
BLAKE2b-256 94cd76b990fa373acc748e38b2d50a8889aeada725107ee4da0296b7d5ef0f8a

See more details on using hashes here.

File details

Details for the file odysseeapi-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: odysseeapi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for odysseeapi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73e4f104a04bedce633079441a3f094e7d32802775023ded8f45f7c9223ce646
MD5 639101b35468b2b29421958f67358a22
BLAKE2b-256 8ab7d9cb83738ac3fc0ab66d3202a620d4cd3359b39e0f7841e140d6b2de1c25

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page