Asynchronous API wrapper for CHSU schedule API
Project description
CHSUScheduleAPI
Asynchronous API wrapper for CHSU schedule API
Covered methods
- Auth (validate token and sign in)
- Building (get building list)
- StudentGroup (get all the student groups)
- Department (get list of departments and cathedras)
- Auditorium (get auditorium list)
- TimeTable (get number of academic week / get schedule for lecturer / group / full)
- Discipline (get list of discipline)
- Teacher (get list of lecturers)
Installation
Install via pip
pip install chsu_schedule_api
Example
Get building list
import asyncio
from chsu_schedule_api import CHSUApi
client = CHSUApi(username="USERNAME", password="PASSWORD")
async def main() -> None:
await client.auth_signin()
buildings = await client.get_buildings()
print(buildings)
if __name__ == "__main__":
asyncio.run(main())
Example
Get your group schedule
import asyncio
from chsu_schedule_api import CHSUApi
from chsu_schedule_api.models import Group
client = CHSUApi(username="USERNAME", password="PASSWORD")
async def main() -> None:
await client.auth_signin()
group_tt = await client.get_time_table(
Group(
title="1ИСб-01-1оп-22",
from_date="03.04.2024",
to_date="03.04.2024",
)
)
for tt in group_tt:
print(
tt.start_time,
tt.end_time,
tt.discipline.title,
tt.auditory.title
)
if __name__ == "__main__":
asyncio.run(main())
License
MIT
Project details
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
Close
Hashes for chsu_schedule_api-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 747716430f68a732c6f4e4a4e419acc4ba308676538ecf0275f2831e62e911a2 |
|
MD5 | 06ea2aa967c6649214a1bdbde867c630 |
|
BLAKE2b-256 | c2ba7b2c62af07622ad4ab25cf73f877e646c34ccc707d838f7570649e41c31f |