Metadata-Version: 2.4
Name: odysseeapi
Version: 1.0.0
Summary: Unofficial Python API for Odyssee
Author-email: Géry Casiez <gery.casiez@univ-lille.fr>
Project-URL: Repository, https://github.com/casiez/OdysseeAPI
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Description-Content-Type: text/markdown

[![PyPI Version](https://img.shields.io/pypi/v/odysseeapi)](https://pypi.org/project/odysseeapi/)
[![Downloads](https://static.pepy.tech/badge/odysseeapi)](https://pepy.tech/project/odysseeapi)

# Odyssee API

Provides an unofficial API for the [Odyssee platform](https://odyssee.enseignementsup-recherche.gouv.fr/), allowing users to access and interact with their data programmatically.

## Features

- download applications of candidates as zip files
- 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

```bash
pip install odysseeapi
```

## Minimal example

```python
from odysseeapi.OdysseeCOS import OdysseeCOS

numposte = "123456"
username = "xyz"
password = "abc"

# Initialize the API client with the numposte 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 = OdysseeCOS(numposte, True)

# The following line is used to authenticate the user and obtain the necessary cookies and bearer token for subsequent API calls. It is optional when using the cached data
odyssee.authenticate(username, password)

# 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", "123456", "78910")

# Download the reports of the committee members for the candidates in the specified directory
# odyssee.downloadReports("rapportsOdyssee")

# At the end of the first jury meeting, record the opinion for each candidate and the results of the vote
# odyssee.opinion_for_interview("f1e2d3c4-b5a6-4789-9876-543210fedcba", "A", "Motif audition", 16, 16, 0, 0, 16, 0)
```
