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`.
> Сделан на основе документации: https://support.mirapolis.ru/mira-support/#&step=1&name=%5B01004%5D%5BИнструкция%5D%5BОписание+API%5D%5BUSER%5D%5BF%5D%5B2_44%5D&doaction=Go&s=IZ8RV4AEFDzTTMKY9PgS&id=69&type=mediapreview

### Установка

```console
$ pip install mirapolis-virtualroom
```

### Использование
```Python
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.5.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

mirapolis_virtualroom-0.1.5-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mirapolis_virtualroom-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ec1a83458ae0aad7b5c382fdd7fae36e1aca34581ca1abe76d56e19764fb59eb
MD5 ac23aa3a465124218e0c3dd4cd8b598e
BLAKE2b-256 879a40fba72329ddac2b75e8ca2d73dcb429257f8f678f795f70835a5e8f349e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mirapolis_virtualroom-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cf985e19000e4de7e99c76d6e63878e1eb3cf1ddefc21cad3b120dd4e75477a0
MD5 07bc1d37fb26772d04cbe07fa3039951
BLAKE2b-256 cb4a37ade47038f7a1b3b37f6a6b969c9e069717d4d09b5c9451927b82bd2096

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