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
Synchronous example
Get your schedule for today
from chsu_schedule_api import CHSUApi
from chsu_schedule_api.types import Group
client = CHSUApi(username="USERNAME", password="PASSWORD")
client.auth_signin()
group_tt = client.get_time_table(
Group(title="1ИСб-01-1оп-22")
)
for tt in group_tt:
print(
tt.start_time,
tt.end_time,
tt.discipline.title,
tt.auditory.title
)
Asynchronous 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())
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
File details
Details for the file chsu_schedule_api-1.2.2.tar.gz
.
File metadata
- Download URL: chsu_schedule_api-1.2.2.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c6666258e310dbd29556c687922b263163d81795591b690229a6896a4fad045 |
|
MD5 | 65b594bb7afe98ed6013c4bbe5acd390 |
|
BLAKE2b-256 | c888ec41ba1076e33d23bc5034c1a101064a25da4fc5c20f544d3d8a52491a11 |
File details
Details for the file chsu_schedule_api-1.2.2-py3-none-any.whl
.
File metadata
- Download URL: chsu_schedule_api-1.2.2-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 368b9819b98e47106fb8130c1bb5ac327b3a2cbdff68fbac084a69736328a005 |
|
MD5 | 8317886d371fb6e33485a1ea09f29823 |
|
BLAKE2b-256 | 614055f650bf6c0635a75c248f39ed49219a000077c28e9fedac5dd923025f1c |