SchoolMosPy is a lightweight async Python wrapper for school.mos.ru APIs. It provides a simple and intuitive interface to interact with the Moscow School Electronic Diary platform.
- Async architecture - built on
aiohttpandhttpxfor high performance - Type safety - uses
pydanticfor data validation - Simple API - intuitive interface for working with data
- Full-featured - access to marks, homeworks, events, and profile data
- Python 3.12+
- aiohttp >= 3.12.15
- pydantic >= 2.11.9
- httpx >= 0.28.1
pip install schoolmospyimport asyncio
from schoolmospy import StudentClient
async def main():
# Create client
client = StudentClient(
token="your_token",
profile_id=12345
)
# Get profile
profile = await client.get_me()
print(f"Name: {profile.name}")
# Get marks
marks = await client.marks.get(
from_date="2024-01-01",
to_date="2024-12-31"
)
# Get homeworks
homeworks = await client.homeworks.get(
from_date="2024-01-01",
to_date="2024-12-31"
)
# Get events/schedule
events = await client.events.get(
from_date="2024-01-01",
to_date="2024-12-31"
)
await client.close()
asyncio.run(main())This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
Ivan Kriventsev - xd2dd@icloud.com