Skip to main content

Python API Client for Mirapolis VirtualRoom. Based on original documentation. Uses Pydantic and aiohttp.

Project description

Python-клиент для Mirapolis Virtualroom

Клиент находится в разработке!

Особенности

Клиент полностью асинхронный с поддержкой валидации Pydantic. Требуется Python 3.12 или выше. Основан на aiohttp и pydantic.

Сделан на основе официальной документации.

Установка

$ pip install mirapolis-virtualroom

Использование

from mirapolis_virtualroom.virtualroom_api import VirtualRoom
import asyncio
import logging


# Инициализация клиента
mirapolis_api = VirtualRoom(
    app_id="test",
    secret_key="secret_key",
    base_link="https://v1234.vr.mirapolis.ru/mira"
)


async def main():
    # Получение списка мероприятий
    measures = await mirapolis_api.get_measures(
        limit=10, # Количество на одной странице
        offset=40, # Сдвиг страницы
    )
    for measure in measures:
        # Полный вывод
        print(repr(measure))
        # Краткий вывод (строка)
        print(measure)
        # Получение названия
        print(measure.mename)
    # Получение общего количества мероприятий
    print(f"{measures.count=}")


if __name__ == '__main__':
    logging.basicConfig(level="INFO")
    asyncio.run(main())

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

mirapolis_virtualroom-0.1.9.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

mirapolis_virtualroom-0.1.9-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file mirapolis_virtualroom-0.1.9.tar.gz.

File metadata

  • Download URL: mirapolis_virtualroom-0.1.9.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.9.12-1-MANJARO

File hashes

Hashes for mirapolis_virtualroom-0.1.9.tar.gz
Algorithm Hash digest
SHA256 728671e7ab920295971c1a33e2f574307d0d4fc9d4da9b91491201e7a4b4528f
MD5 059eb0c959e139b29633d123277de1ec
BLAKE2b-256 5e7821415c0e3591af9f1e183cb08cf5671458cd66acc5b9f539257cf02c8cce

See more details on using hashes here.

File details

Details for the file mirapolis_virtualroom-0.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for mirapolis_virtualroom-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 51f770ca0df312e0a1ed52ed1e134d0666111d9f0cd042b7b0ef1a6553ac4e72
MD5 7f6460d6c347dee80354c31edb6f482b
BLAKE2b-256 77c7da03c4eb56b5c85e296f88113a69db8dd3f0c7ee5b6324a9fd6bd22b1813

See more details on using hashes here.

Supported by

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