A Python library for interacting with data from esprit-tn.com
Project description
esprit-py
[!NOTE]
Please note that this library is not an official API provided by Esprit and is intended for educational and personal use only.
Features
-
Get your exact timetable pdf not 300 pages pdf
-
Get your grades
-
Get your absences
-
Get your credits
-
Calculate your total semester average
Installation
pip install esprit-py
download chromedriver
from here
Examples
get your total avreage:
from esprit import Esprit
# Replace with your actual ID and password
id = 'ID'
password = 'PASSWORD'
grades = None
# Keep trying to get grades until it is successful cuz esprit use garabage servers
while grades is None:
try:
# Create an Esprit object
esprit = Esprit(
driver_path="C:/path/to/chromedriver.exe")
# Attempt to log in
esprit.login(id, password)
# Get grades
grades = esprit.get_grades()
except Exception as e:
print(f"An error occurred: {e}. Retrying...")
if grades is not None:
for grade in grades:
print(grade)
else:
print("Failed to get grades.")
esprit.calculate_average(grades)
get a list of all your absences;
from esprit import Esprit
# Create an Esprit object
esprit = Esprit(
driver_path="C:/path/to/chromedriver.exe",)
# Replace with your actual ID and password
id = 'ID'
password = 'PASSWORD'
# Attempt to log in
if esprit.login(id, password):
print("Login successful.")
else:
print("Login failed.")
# Get absences
absences = esprit.get_absences()
if absences is not None:
for absence in absences:
print(absence)
else:
print("Failed to get absences.")
More examples can be found in the examples folder
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
esprit-py-0.3.4.tar.gz
(9.1 kB
view hashes)
Built Distribution
esprit_py-0.3.4-py3-none-any.whl
(11.1 kB
view hashes)
Close
Hashes for esprit_py-0.3.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b520b4c25f82e417172d967f6dc3c797e0e9ff996a5c8008642036172b10036a |
|
MD5 | 835087bcaf1e7dde8fc866835122bfc2 |
|
BLAKE2b-256 | f664610c59a49ba2d30fec142f06e818632ff6fab2b5d5a688045fdfc5ece82f |