Wrapper for Cheminot's API
Project description
Cheminot API wrapper
A simple wrapper for Cheminot's API to aid in registration automation.
Cheminot is the course registration application of École de technologie supérieure.
[!CAUTION] Registration automation may not be allowed; real usage of this wrapper is discouraged.
I made this for fun and API reverse engineering practice.
Installation
pip install cheminot
Usage
Instanciation
from cheminot import CheminotSession
cheminot = CheminotSession(
AUTH_TOKEN,
USER_AGENT,
STUDENT_ID,
PROGRAM_ID,
SEMESTER_ID,
"https://cheminotn.etsmtl.ca"
)
Methods
get_path_courses() # Retrieve the program's path's courses.
get_course_available_groups(course_id: str) # Get available groups for a specific course.
register_to_course(course_id: str, group_number: str, concentration: str) # Register to a course's group.
unregister_from_course(course_id: str) # Unregister from a course.
get_schedule() # Retrieve the current schedule.
confirm_schedule() # Confirm/save the current schedule.
Variables
AUTH_TOKEN
The JWT authorization token associated with the session to be used in requests. It expires after 1 hour.
USER_AGENT
The user to be used in requests.
STUDENT_ID
The permanent student code.
PROGRAM_ID
The code of the program.
SEMESTER_ID
The semester's code.
Format: {YEAR}{SEMESTER_POSITION_IN_YEAR(1 for Winter, 2 for Summer and 3 for Fall)}
CONCENTRATION_ID
Possible values:
- "TC" (for Tronc Commun) used for mandatory courses.
- "AX" (for Axe), used for optional courses.
Endpoints
Get path's courses
GET /api/Etudiant/{STUDENT_ID}/programme/{PROGRAM_ID}/cheminement?session={SEMESTER_ID}
Get course's available groups
GET /api/CoursOfferts/{STUDENT_ID}/programme/{PROGRAM_ID}/cours/{COURSE_ID}?sessionInscr={SEMESTER_ID}
Register to a course
POST /api/horaire/etudiant/{STUDENT_ID}/programme/{PROGRAM_ID}/horaire/add?session={SEMESTER_ID}&concentration={CONCENTRATION_ID}
Body: {"Sigle":"{COURSE_ID}","Groupe":"{GROUP_NUMBER}"}
Unregister from a course
DELETE /api/horaire/etudiant/{STUDENT_ID}/programme/{PROGRAM_ID}/session/{SEMESTER_ID}/cours/{COURSE_ID}
Get schedule
GET /api/horaire/etudiant/{STUDENT_ID}/programme/{PROGRAM_ID}/horaire?session={SEMESTER_ID}
Confirm schedule
PUT /api/horaire/etudiant/{STUDENT_ID}/confirmation-horaire
Body: {"SessionInscr":{SEMESTER_ID},"ProgrammeId":"{PROGRAM_ID}"}
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 cheminot-1.0.0.tar.gz.
File metadata
- Download URL: cheminot-1.0.0.tar.gz
- Upload date:
- Size: 40.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cf744d5330dfdf3a27dc09f56155229ca0795250e6b5f290f98e1419b344f84
|
|
| MD5 |
e951f97eae8488c714e24bac1beb736b
|
|
| BLAKE2b-256 |
d6595d1d62c6e7839a5cd1d0a4a1ed46500bfcd207992389fe2ed06fdda54e32
|
Provenance
The following attestation bundles were made for cheminot-1.0.0.tar.gz:
Publisher:
pypi.yml on ariannelafraise/cheminot-api-wrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cheminot-1.0.0.tar.gz -
Subject digest:
1cf744d5330dfdf3a27dc09f56155229ca0795250e6b5f290f98e1419b344f84 - Sigstore transparency entry: 1728647637
- Sigstore integration time:
-
Permalink:
ariannelafraise/cheminot-api-wrapper@2d9fb1b1c7cf291e282e6183ace4181af6f82ce9 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/ariannelafraise
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@2d9fb1b1c7cf291e282e6183ace4181af6f82ce9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cheminot-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cheminot-1.0.0-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
172d36c6705ac0975720bba5ee702797d8e13ee5c1db5b96b49a89dbef636685
|
|
| MD5 |
1ba39562c40a42b0bed084a18f82cef4
|
|
| BLAKE2b-256 |
c93803a2e84d3a3786255b727b64ec1ec0b9726fb2c68ceeb773f74cabb9b360
|
Provenance
The following attestation bundles were made for cheminot-1.0.0-py3-none-any.whl:
Publisher:
pypi.yml on ariannelafraise/cheminot-api-wrapper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cheminot-1.0.0-py3-none-any.whl -
Subject digest:
172d36c6705ac0975720bba5ee702797d8e13ee5c1db5b96b49a89dbef636685 - Sigstore transparency entry: 1728647727
- Sigstore integration time:
-
Permalink:
ariannelafraise/cheminot-api-wrapper@2d9fb1b1c7cf291e282e6183ace4181af6f82ce9 -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/ariannelafraise
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@2d9fb1b1c7cf291e282e6183ace4181af6f82ce9 -
Trigger Event:
release
-
Statement type: