A Python implementation of the Zermelo API.
- Get appointments from a zermelo calendar.
- Get data of a zermelo user.
- Get announcements.
To install the package run this command:
pip install zermelo.py
Client()
params:
School: String ? Name of the school.
Result:
Client: Zermelo.Client()
Demo:
from zermelo import Client
cl = Client("scalacollege")
Client.authenticate()
Params:
Code: String ? A connect code you get from https://YOURSCHOOLNAME.zportel.nl/main/#connectionsModule-connectApp
Result:
Token: dict()
Demo:
token = cl.auhtenticate("441 440 997 507")
print(token["access_token"])
Client.get_user()
Params:
Token: String ? Access_token you get from the Client.Authenticate() function
Result:
User: dict()
Demo:
user = cl.get_user(token["access_token"])
print(user)
Client.get_appointments()
Params:
Token: String ? Access_token you get from the Client.Authenticate() function
StartUnix: int ? Unix timestamp for the first date you want to get the appointments from.
EndUnix: int ? Unix timestamp for the last date you want to get the appointments from.
Result:
Appointments: dict()
Demo:
appointments = cl.get_appointments(token["access_token"], 1567468800, 1568073600)
print(appointments)
Client.get_announcements()
Params:
Token: String ? Access_token you get from the Client.Authenticate() function
Result:
Announcements: dict()
Demo:
announcements = cl.get_announcements(token["access_token"])
print(announcements)
Client.get_liveschedule()
Params:
Token: String ? Access_token you get from the Client.Authenticate() function
Week: String ? The ISO-week for which you want to request the schedule
Usercode: String ? The code of the student you want to request the schedule of
Result:
Enrollments: dict()
Demo:
usercode = cl.get_user(token["access_token"])["response"]["data"][0]["code"]
enrollments = cl.get_liveschedule(token["access_token"], "202150", usercode) # Requests week 50 of the year 2021
print(enrollments)