https://github.com/bobronium/aiospbstu
Asynchronous wrapper for PolyTech Schedule API
https://github.com/bobronium/aiospbstu
Last synced: 3 months ago
JSON representation
Asynchronous wrapper for PolyTech Schedule API
- Host: GitHub
- URL: https://github.com/bobronium/aiospbstu
- Owner: Bobronium
- License: mit
- Created: 2019-05-19T17:42:40.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T05:08:27.000Z (over 2 years ago)
- Last Synced: 2025-02-08T09:38:26.266Z (4 months ago)
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# aiospbstu
Asynchronous API wrapper for PolyTech Schedule API
# Example
```python
import asyncio
from aiospbstu import PolyScheduleAPIapi = PolyScheduleAPI()
async def main():
faculties = await api.get_faculties()
first_faculty = faculties[0]
print(first_faculty.name) # "Институт компьютерных наук и технологий"
groups = await first_faculty.get_groups()
schedule = await groups[0].get_schedule()
for day in schedule:
print(f'{day.date} - {len(day.lessons)} lessons')
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
```# Installation
```bash
$ pip install "https://github.com/MrMrRobat/aiospbstu/archive/master.zip"
```###### Inspired by Alex Root Junior's [aiogram](https://github.com/aiogram/aiogram)