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

📝 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.4.tar.gz (19.1 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.4-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for schoolmospy-0.2.4.tar.gz
Algorithm Hash digest
SHA256 c98b5701918a4d45451bb331b6c9afd301979c78a4368461c7b426f5df7539c2
MD5 b66c6fce2c8eb8b82da054e5d577fe56
BLAKE2b-256 b7304c5614ef40b367ee2d4ca806b9084f3fcc44e8a23d4752eb57553f0584d5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for schoolmospy-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e1114fc12bb75a039d54557222ca04b01c3eb413b5a19aadb0a9d5f3a2ae92e2
MD5 fcb266c1225163ff1e653db68773a7f2
BLAKE2b-256 8a838f2298783fd65037689cf66c91ba84b04105bd46c5868a136449254ef270

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