Skip to main content

A lightweight async Python wrapper for school.mos.ru APIs

Project description

Badge Python License

📕 SchoolMosPy

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.

✨ Features

  • Async architecture - built on aiohttp and httpx for high performance
  • Type safety - uses pydantic for data validation
  • Simple API - intuitive interface for working with data
  • Full-featured - access to marks, homeworks, events, meals, and profile data

📋 Requirements

  • Python 3.12+
  • aiohttp >= 3.12.15
  • pydantic >= 2.11.9
  • httpx >= 0.28.1

📦 Installation

pip install schoolmospy

🚀 Quick Start

import 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())

🧪 Live Test Script

Run the live script for new endpoint:

python test.py

Fill values in test.py first:

  • TOKEN
  • PROFILE_ID
  • PERSON_ID (contingent GUID)

📝 License

This project is licensed under the GPL-3.0 License. See the LICENSE file for details.

🔗 Links

👨‍💻 Author

Ivan Kriventsev - xd2dd@icloud.com


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

schoolmospy-0.2.5.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

schoolmospy-0.2.5-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file schoolmospy-0.2.5.tar.gz.

File metadata

  • Download URL: schoolmospy-0.2.5.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Linux/6.14.0-1017-azure

File hashes

Hashes for schoolmospy-0.2.5.tar.gz
Algorithm Hash digest
SHA256 cd1fe6e875aca521962f1d9e372bee52777709d03b83de23af571bd5514513cb
MD5 69ab8d06a60d80ad7080e777a1839788
BLAKE2b-256 5080a465a0dfa050ffbc8bda1ce3183e655e2e3907ba31d895ec8c00ec988328

See more details on using hashes here.

File details

Details for the file schoolmospy-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: schoolmospy-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.12.12 Linux/6.14.0-1017-azure

File hashes

Hashes for schoolmospy-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 69a8695cc33c79fc0c6290fb93dcf57be7905f855a1120692e6e5cc2e00f261e
MD5 ba39190759c104c30fd7b07d46084763
BLAKE2b-256 b16bf4831ff36a5a1ce5327c017639653c82381ac193c0e9623a8d7630cf2bd9

See more details on using hashes here.

Supported by

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