Skip to main content

Asynchronous API wrapper for CHSU schedule API

Project description

drawing

CHSUScheduleAPI

Pydantic v2 Aiohttp Checked with mypy Poetry

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

chsu_schedule_api-1.2.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

chsu_schedule_api-1.2.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

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

Hashes for chsu_schedule_api-1.2.2.tar.gz
Algorithm Hash digest
SHA256 0c6666258e310dbd29556c687922b263163d81795591b690229a6896a4fad045
MD5 65b594bb7afe98ed6013c4bbe5acd390
BLAKE2b-256 c888ec41ba1076e33d23bc5034c1a101064a25da4fc5c20f544d3d8a52491a11

See more details on using hashes here.

Provenance

File details

Details for the file chsu_schedule_api-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for chsu_schedule_api-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 368b9819b98e47106fb8130c1bb5ac327b3a2cbdff68fbac084a69736328a005
MD5 8317886d371fb6e33485a1ea09f29823
BLAKE2b-256 614055f650bf6c0635a75c248f39ed49219a000077c28e9fedac5dd923025f1c

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page