-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.py
executable file
·81 lines (52 loc) · 1.88 KB
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import ISENpy
# Create a new instance of the ISENpy class
client = ISENpy.Client(
username="",
password="",
)
#Check if the user is logged in
if not client.logged_in:
print("Identifiant ou mot de passe incorect !!")
exit()
className = client.getMyClass()
print(className)
##########################################
grades = client.grades()
print(grades.average)
for grade in grades.data:
print(f"{grade.date} : {grade.grade} ({grade.name} | {grade.instructors}), {grade.appreciation}, {grade.absence}")
# Or more simply
# print(grades)
# print(grades["data"][0]["date"]) # ... (use like a dict)
##########################################
absences = client.absences()
print(absences.nbAbsences)
print(absences.time)
for absence in absences.data:
print(f" \
{absence.date} : {absence.reason} \
({absence.duration} | {absence.schedule} | {absence.course} | \
{absence.instructor} | {absence.subject}) \
")
# Or more simply
# print(absences)
# print(absences["data"][0]["date"]) # ... (use like a dict)
##########################################
planning = client.planning()
for event in planning.data:
print(f" \
{event.subject} ({event.start} | {event.end} , \
{event.start_time} | {event.end_time}, {event.instructor} | {event.room}), \
{event.type}, {event.class_name}, {event.description}, {event.class_info} \
")
# Or more simply
# print(planning)
# print(planning["data"][0]["subject"]) # ... (use like a dict)
##########################################
schoolReport = client.getSchoolReport()
print(schoolReport.nbReports)
for report in schoolReport.data:
print(f"{report.name} : {report.id}")
# Or more simply
# print(schoolReport)
# print(schoolReport["data"][0]["name"]) # ... (use like a dict)