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, 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_marks(
        from_date="2024-01-01",
        to_date="2024-12-31"
    )

    # Get homeworks
    homeworks = await client.homeworks.get_homeworks(
        from_date="2024-01-01",
        to_date="2024-12-31"
    )

    # Get events/schedule
    events = await client.events.get_events(
        from_date="2024-01-01",
        to_date="2024-12-31"
    )

    await client.close()

asyncio.run(main())

📝 License

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

🔗 Links

👨‍💻 Author

Ivan Kriventsev - xd2dd@icloud.com


⭐ If you like this project, please give it a star on GitHub!

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.2.tar.gz (19.0 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.2-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: schoolmospy-0.2.2.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Linux/6.11.0-1018-azure

File hashes

Hashes for schoolmospy-0.2.2.tar.gz
Algorithm Hash digest
SHA256 2876e69d99464709fdf380ef0c536e38078ba931c789d2962e32e829dc573277
MD5 c93581c059268ac40ea119003ff7fa1f
BLAKE2b-256 c37d0909407b77ea552b687bb5d48d2dc7a22e0cfb1aa736b865b3b877bf6b5d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: schoolmospy-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.12 Linux/6.11.0-1018-azure

File hashes

Hashes for schoolmospy-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d17bfa866af0ee82ec719b92db9748d02f88bb647ebfa5dbc056b87959e8d75f
MD5 5a2c9ac6609a0e16b02fc9ef583ae2a2
BLAKE2b-256 5a7b0676b7e01076ef3302dd14aa71e1386d62ae7c0e3a4c04cb56018703d412

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