myges-api 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- myges_api-0.3.0/.gitignore +20 -0
- myges_api-0.3.0/LICENSE +21 -0
- myges_api-0.3.0/PKG-INFO +125 -0
- myges_api-0.3.0/README.md +97 -0
- myges_api-0.3.0/openapi/myges.yaml +1742 -0
- myges_api-0.3.0/pyproject.toml +89 -0
- myges_api-0.3.0/src/myges/__init__.py +39 -0
- myges_api-0.3.0/src/myges/_version.py +1 -0
- myges_api-0.3.0/src/myges/auth.py +198 -0
- myges_api-0.3.0/src/myges/blocs.py +99 -0
- myges_api-0.3.0/src/myges/cli.py +1942 -0
- myges_api-0.3.0/src/myges/client.py +682 -0
- myges_api-0.3.0/src/myges/errors.py +48 -0
- myges_api-0.3.0/src/myges/gcal.py +288 -0
- myges_api-0.3.0/src/myges/ics.py +70 -0
- myges_api-0.3.0/src/myges/models.py +640 -0
- myges_api-0.3.0/src/myges/notify.py +152 -0
- myges_api-0.3.0/src/myges/pending.py +81 -0
- myges_api-0.3.0/src/myges/py.typed +0 -0
- myges_api-0.3.0/src/myges/registration.py +225 -0
- myges_api-0.3.0/src/myges/schedule.py +139 -0
- myges_api-0.3.0/src/myges/watch.py +211 -0
- myges_api-0.3.0/tests/conftest.py +105 -0
- myges_api-0.3.0/tests/contract.py +67 -0
- myges_api-0.3.0/tests/fixtures/error_400.json +13 -0
- myges_api-0.3.0/tests/fixtures/error_404.json +12 -0
- myges_api-0.3.0/tests/fixtures/getAbsences.json +17 -0
- myges_api-0.3.0/tests/fixtures/getAgenda.json +143 -0
- myges_api-0.3.0/tests/fixtures/getBanners.json +47 -0
- myges_api-0.3.0/tests/fixtures/getCampuses.json +31 -0
- myges_api-0.3.0/tests/fixtures/getClass.json +20 -0
- myges_api-0.3.0/tests/fixtures/getClassStudents.json +43 -0
- myges_api-0.3.0/tests/fixtures/getClasses.json +26 -0
- myges_api-0.3.0/tests/fixtures/getCourse.json +26 -0
- myges_api-0.3.0/tests/fixtures/getCourseFiles.json +39 -0
- myges_api-0.3.0/tests/fixtures/getCourses.json +45 -0
- myges_api-0.3.0/tests/fixtures/getEvents.json +20 -0
- myges_api-0.3.0/tests/fixtures/getGrades.json +54 -0
- myges_api-0.3.0/tests/fixtures/getNews.json +66 -0
- myges_api-0.3.0/tests/fixtures/getNewsItem.json +26 -0
- myges_api-0.3.0/tests/fixtures/getNextProjectSteps.json +20 -0
- myges_api-0.3.0/tests/fixtures/getPartners.json +16 -0
- myges_api-0.3.0/tests/fixtures/getPracticals.json +79 -0
- myges_api-0.3.0/tests/fixtures/getProfile.json +58 -0
- myges_api-0.3.0/tests/fixtures/getProject.json +136 -0
- myges_api-0.3.0/tests/fixtures/getProjectGroupMessages.json +6 -0
- myges_api-0.3.0/tests/fixtures/getProjects.json +135 -0
- myges_api-0.3.0/tests/fixtures/getSchools.json +13 -0
- myges_api-0.3.0/tests/fixtures/getStudent.json +21 -0
- myges_api-0.3.0/tests/fixtures/getSyllabus.json +88 -0
- myges_api-0.3.0/tests/fixtures/getTeacher.json +21 -0
- myges_api-0.3.0/tests/fixtures/getTeachers.json +25 -0
- myges_api-0.3.0/tests/fixtures/getYears.json +10 -0
- myges_api-0.3.0/tests/test_blocs.py +136 -0
- myges_api-0.3.0/tests/test_client.py +327 -0
- myges_api-0.3.0/tests/test_gcal.py +165 -0
- myges_api-0.3.0/tests/test_ics_cli.py +293 -0
- myges_api-0.3.0/tests/test_live.py +123 -0
- myges_api-0.3.0/tests/test_models.py +123 -0
- myges_api-0.3.0/tests/test_registration.py +444 -0
- myges_api-0.3.0/tests/test_schedule.py +129 -0
- myges_api-0.3.0/tests/test_spec.py +57 -0
- myges_api-0.3.0/tests/test_watch.py +269 -0
- myges_api-0.3.0/tests/test_watch_reliability.py +224 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
.venv/
|
|
5
|
+
build/
|
|
6
|
+
dist/
|
|
7
|
+
*.egg-info/
|
|
8
|
+
.mypy_cache/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
.coverage
|
|
12
|
+
|
|
13
|
+
# Données personnelles : captures de vraies réponses, tokens, identifiants.
|
|
14
|
+
# Les fixtures de tests/fixtures/ sont synthétiques et doivent le rester.
|
|
15
|
+
.env
|
|
16
|
+
.env.*
|
|
17
|
+
!.env.example
|
|
18
|
+
captures/
|
|
19
|
+
tokens.json
|
|
20
|
+
*.ics
|
myges_api-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arnaudmyges
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
myges_api-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: myges-api
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Client Python typé (sync + async), CLI et spécification OpenAPI de l'API myGES / Kordis (non officielle).
|
|
5
|
+
Project-URL: Homepage, https://arnaudmyges.github.io/myges-api/
|
|
6
|
+
Project-URL: Documentation, https://arnaudmyges.github.io/myges-api/docs/
|
|
7
|
+
Project-URL: Source, https://github.com/Arnaudmyges/myges-api
|
|
8
|
+
Author: Arnaudmyges
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: esgi,kordis,myges,openapi,skolae,swagger
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Natural Language :: French
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Requires-Dist: httpx>=0.27
|
|
20
|
+
Requires-Dist: pydantic>=2.7
|
|
21
|
+
Requires-Dist: tzdata; sys_platform == 'win32'
|
|
22
|
+
Provides-Extra: cli
|
|
23
|
+
Requires-Dist: rich>=13; extra == 'cli'
|
|
24
|
+
Requires-Dist: typer>=0.12; extra == 'cli'
|
|
25
|
+
Provides-Extra: gcal
|
|
26
|
+
Requires-Dist: google-auth>=2.20; extra == 'gcal'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# myGES API : CLI, bibliothèque Python et doc Swagger non officielles
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<a href="https://arnaudmyges.github.io/myges-api/docs/"><img alt="Swagger UI" src="https://img.shields.io/badge/Swagger_UI-docs-85EA2D?logo=swagger&logoColor=black&style=for-the-badge"></a>
|
|
33
|
+
<a href="https://arnaudmyges.github.io/myges-api/docs/redoc.html"><img alt="Redoc" src="https://img.shields.io/badge/Redoc-r%C3%A9f%C3%A9rence-E53935?logo=readthedocs&logoColor=white&style=for-the-badge"></a>
|
|
34
|
+
<a href="https://github.com/Arnaudmyges/myges-api/blob/main/openapi/myges.yaml"><img alt="OpenAPI 3.1" src="https://img.shields.io/badge/OpenAPI-3.1-6BA539?logo=openapiinitiative&logoColor=white&style=for-the-badge"></a>
|
|
35
|
+
<a href="https://arnaudmyges.github.io/myges-api/docs/"><img alt="33 endpoints" src="https://img.shields.io/badge/endpoints-33-blue?style=for-the-badge"></a>
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
**myGES dans ton terminal** : emploi du temps, notes, supports de cours en un clic, alertes
|
|
39
|
+
sur ton téléphone. Pour les étudiants de l'**ESGI** et des autres écoles du **Réseau GES**
|
|
40
|
+
qui utilisent myGES. Avec la documentation Swagger complète de l'API myGES.
|
|
41
|
+
|
|
42
|
+
<p align="center">
|
|
43
|
+
<a href="https://arnaudmyges.github.io/myges-api/docs/">
|
|
44
|
+
<img alt="Documentation Swagger de l'API myGES" src="https://raw.githubusercontent.com/Arnaudmyges/myges-api/main/docs/assets/swagger.png" width="50%">
|
|
45
|
+
</a>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
> Projet **non officiel**, sans lien avec Kordis ni le Réseau GES.
|
|
49
|
+
|
|
50
|
+
## Installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
sudo apt install pipx && pipx ensurepath # puis ouvrir un nouveau terminal
|
|
54
|
+
pipx install "myges-api[cli] @ https://github.com/Arnaudmyges/myges-api/archive/refs/heads/main.zip"
|
|
55
|
+
myges login
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
macOS, Windows, mise à jour : [installation](https://github.com/Arnaudmyges/myges-api/blob/main/docs/installation.md).
|
|
59
|
+
|
|
60
|
+
## Utilisation
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
myges next # ton prochain cours, salle, prof
|
|
64
|
+
myges agenda # la semaine
|
|
65
|
+
myges grades # tes notes
|
|
66
|
+
myges files --download # tous les supports de cours, rangés par matière
|
|
67
|
+
myges --help # tout le reste
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Toutes les commandes : [docs/cli.md](https://github.com/Arnaudmyges/myges-api/blob/main/docs/cli.md).
|
|
71
|
+
|
|
72
|
+
## Alertes
|
|
73
|
+
|
|
74
|
+
Une nouvelle note, un nouveau support, un cours annulé ? Reçois-le sur ton téléphone, Discord
|
|
75
|
+
ou par e-mail : [alertes](https://github.com/Arnaudmyges/myges-api/blob/main/docs/alertes.md).
|
|
76
|
+
|
|
77
|
+
## Google Calendar
|
|
78
|
+
|
|
79
|
+
Ton emploi du temps dans Google Calendar, toujours à jour : [synchro Google Calendar](https://github.com/Arnaudmyges/myges-api/blob/main/docs/google-calendar.md).
|
|
80
|
+
|
|
81
|
+
## Questions fréquentes
|
|
82
|
+
|
|
83
|
+
<details>
|
|
84
|
+
<summary><b>Comment exporter son emploi du temps myGES vers Google Calendar ?</b></summary>
|
|
85
|
+
|
|
86
|
+
`myges gcal sync` tient un agenda Google Calendar à jour tout seul (cours ajoutés, déplacés,
|
|
87
|
+
annulés). Pour un export ponctuel vers n'importe quel agenda : `myges agenda --ics cours.ics`.
|
|
88
|
+
</details>
|
|
89
|
+
|
|
90
|
+
<details>
|
|
91
|
+
<summary><b>Comment télécharger tous les supports de cours myGES d'un coup ?</b></summary>
|
|
92
|
+
|
|
93
|
+
`myges files --download` : un dossier par matière. Relancer la commande ne récupère que les
|
|
94
|
+
nouveaux supports.
|
|
95
|
+
</details>
|
|
96
|
+
|
|
97
|
+
<details>
|
|
98
|
+
<summary><b>Comment être prévenu d'une nouvelle note ou d'un nouveau support ?</b></summary>
|
|
99
|
+
|
|
100
|
+
`myges notify add ntfy` (ou Discord, e-mail) puis `myges watch --install` : les nouveaux
|
|
101
|
+
supports arrivent en moins de 5 minutes.
|
|
102
|
+
</details>
|
|
103
|
+
|
|
104
|
+
<details>
|
|
105
|
+
<summary><b>Comment s'inscrire à un événement myGES dès l'ouverture des inscriptions ?</b></summary>
|
|
106
|
+
|
|
107
|
+
`myges events subscribe 4525` (l'id est à la fin de l'adresse de l'événement) : l'inscription
|
|
108
|
+
part à la seconde où elles ouvrent.
|
|
109
|
+
</details>
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary><b>Mon mot de passe est-il en sécurité ?</b></summary>
|
|
113
|
+
|
|
114
|
+
Il n'est envoyé qu'au serveur d'authentification de myGES (Kordis). Ta machine garde la
|
|
115
|
+
session (un jeton valable ~6 jours), et le mot de passe seulement si tu le demandes
|
|
116
|
+
(`--save-password`, pour les alertes automatiques), dans des fichiers lisibles par toi seul.
|
|
117
|
+
Le code est ouvert : tout se vérifie.
|
|
118
|
+
</details>
|
|
119
|
+
|
|
120
|
+
## Pour les développeurs
|
|
121
|
+
|
|
122
|
+
[Swagger](https://arnaudmyges.github.io/myges-api/docs/) ·
|
|
123
|
+
[bibliothèque Python](https://github.com/Arnaudmyges/myges-api/blob/main/docs/bibliotheque.md) ·
|
|
124
|
+
[notes sur l'API](https://github.com/Arnaudmyges/myges-api/blob/main/docs/api-notes.md) ·
|
|
125
|
+
[contribuer](https://github.com/Arnaudmyges/myges-api/blob/main/CONTRIBUTING.md) — licence MIT.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# myGES API : CLI, bibliothèque Python et doc Swagger non officielles
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://arnaudmyges.github.io/myges-api/docs/"><img alt="Swagger UI" src="https://img.shields.io/badge/Swagger_UI-docs-85EA2D?logo=swagger&logoColor=black&style=for-the-badge"></a>
|
|
5
|
+
<a href="https://arnaudmyges.github.io/myges-api/docs/redoc.html"><img alt="Redoc" src="https://img.shields.io/badge/Redoc-r%C3%A9f%C3%A9rence-E53935?logo=readthedocs&logoColor=white&style=for-the-badge"></a>
|
|
6
|
+
<a href="https://github.com/Arnaudmyges/myges-api/blob/main/openapi/myges.yaml"><img alt="OpenAPI 3.1" src="https://img.shields.io/badge/OpenAPI-3.1-6BA539?logo=openapiinitiative&logoColor=white&style=for-the-badge"></a>
|
|
7
|
+
<a href="https://arnaudmyges.github.io/myges-api/docs/"><img alt="33 endpoints" src="https://img.shields.io/badge/endpoints-33-blue?style=for-the-badge"></a>
|
|
8
|
+
</p>
|
|
9
|
+
|
|
10
|
+
**myGES dans ton terminal** : emploi du temps, notes, supports de cours en un clic, alertes
|
|
11
|
+
sur ton téléphone. Pour les étudiants de l'**ESGI** et des autres écoles du **Réseau GES**
|
|
12
|
+
qui utilisent myGES. Avec la documentation Swagger complète de l'API myGES.
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://arnaudmyges.github.io/myges-api/docs/">
|
|
16
|
+
<img alt="Documentation Swagger de l'API myGES" src="https://raw.githubusercontent.com/Arnaudmyges/myges-api/main/docs/assets/swagger.png" width="50%">
|
|
17
|
+
</a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
> Projet **non officiel**, sans lien avec Kordis ni le Réseau GES.
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
sudo apt install pipx && pipx ensurepath # puis ouvrir un nouveau terminal
|
|
26
|
+
pipx install "myges-api[cli] @ https://github.com/Arnaudmyges/myges-api/archive/refs/heads/main.zip"
|
|
27
|
+
myges login
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
macOS, Windows, mise à jour : [installation](https://github.com/Arnaudmyges/myges-api/blob/main/docs/installation.md).
|
|
31
|
+
|
|
32
|
+
## Utilisation
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
myges next # ton prochain cours, salle, prof
|
|
36
|
+
myges agenda # la semaine
|
|
37
|
+
myges grades # tes notes
|
|
38
|
+
myges files --download # tous les supports de cours, rangés par matière
|
|
39
|
+
myges --help # tout le reste
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Toutes les commandes : [docs/cli.md](https://github.com/Arnaudmyges/myges-api/blob/main/docs/cli.md).
|
|
43
|
+
|
|
44
|
+
## Alertes
|
|
45
|
+
|
|
46
|
+
Une nouvelle note, un nouveau support, un cours annulé ? Reçois-le sur ton téléphone, Discord
|
|
47
|
+
ou par e-mail : [alertes](https://github.com/Arnaudmyges/myges-api/blob/main/docs/alertes.md).
|
|
48
|
+
|
|
49
|
+
## Google Calendar
|
|
50
|
+
|
|
51
|
+
Ton emploi du temps dans Google Calendar, toujours à jour : [synchro Google Calendar](https://github.com/Arnaudmyges/myges-api/blob/main/docs/google-calendar.md).
|
|
52
|
+
|
|
53
|
+
## Questions fréquentes
|
|
54
|
+
|
|
55
|
+
<details>
|
|
56
|
+
<summary><b>Comment exporter son emploi du temps myGES vers Google Calendar ?</b></summary>
|
|
57
|
+
|
|
58
|
+
`myges gcal sync` tient un agenda Google Calendar à jour tout seul (cours ajoutés, déplacés,
|
|
59
|
+
annulés). Pour un export ponctuel vers n'importe quel agenda : `myges agenda --ics cours.ics`.
|
|
60
|
+
</details>
|
|
61
|
+
|
|
62
|
+
<details>
|
|
63
|
+
<summary><b>Comment télécharger tous les supports de cours myGES d'un coup ?</b></summary>
|
|
64
|
+
|
|
65
|
+
`myges files --download` : un dossier par matière. Relancer la commande ne récupère que les
|
|
66
|
+
nouveaux supports.
|
|
67
|
+
</details>
|
|
68
|
+
|
|
69
|
+
<details>
|
|
70
|
+
<summary><b>Comment être prévenu d'une nouvelle note ou d'un nouveau support ?</b></summary>
|
|
71
|
+
|
|
72
|
+
`myges notify add ntfy` (ou Discord, e-mail) puis `myges watch --install` : les nouveaux
|
|
73
|
+
supports arrivent en moins de 5 minutes.
|
|
74
|
+
</details>
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary><b>Comment s'inscrire à un événement myGES dès l'ouverture des inscriptions ?</b></summary>
|
|
78
|
+
|
|
79
|
+
`myges events subscribe 4525` (l'id est à la fin de l'adresse de l'événement) : l'inscription
|
|
80
|
+
part à la seconde où elles ouvrent.
|
|
81
|
+
</details>
|
|
82
|
+
|
|
83
|
+
<details>
|
|
84
|
+
<summary><b>Mon mot de passe est-il en sécurité ?</b></summary>
|
|
85
|
+
|
|
86
|
+
Il n'est envoyé qu'au serveur d'authentification de myGES (Kordis). Ta machine garde la
|
|
87
|
+
session (un jeton valable ~6 jours), et le mot de passe seulement si tu le demandes
|
|
88
|
+
(`--save-password`, pour les alertes automatiques), dans des fichiers lisibles par toi seul.
|
|
89
|
+
Le code est ouvert : tout se vérifie.
|
|
90
|
+
</details>
|
|
91
|
+
|
|
92
|
+
## Pour les développeurs
|
|
93
|
+
|
|
94
|
+
[Swagger](https://arnaudmyges.github.io/myges-api/docs/) ·
|
|
95
|
+
[bibliothèque Python](https://github.com/Arnaudmyges/myges-api/blob/main/docs/bibliotheque.md) ·
|
|
96
|
+
[notes sur l'API](https://github.com/Arnaudmyges/myges-api/blob/main/docs/api-notes.md) ·
|
|
97
|
+
[contribuer](https://github.com/Arnaudmyges/myges-api/blob/main/CONTRIBUTING.md) — licence MIT.
|