Skip to main content

The asynchronous library for monobank API

Project description

AIOMono (Alpha)

The aiomono is fully asynchronous library for Monobank API written in Python 3.8 with asyncio, aiohttp and pydantic.

Setup

  • You get token for your client from MonobankAPI.
  • Install the latest version of the aiomono: pip install aiomono

Examples

We have 3 different classes for use Monobank API:

  • MonoClient is simple base class for others, can only get currencies
  • PersonalMonoClient - this class for talk to personal Monobank API
  • CorporateMonoClient - this class for talk to corporate Monobank API (soon)

Simple get_currency request

import asyncio
from aiomono import MonoClient

mono_client = MonoClient()

async def main():
    async with mono_client as client:
        client_info = await client.get_currency()
        print(client_info)

asyncio.run(main())

client_info request

import asyncio
from aiomono import PersonalMonoClient

MONOBANK_API_TOKEN = 'your token'


async def main():
    try:
        mono_client = PersonalMonoClient(MONOBANK_API_TOKEN)
        client_info = await mono_client.client_info()
        print(f'User name {client_info.name} 😍')
    finally:
        await mono_client.close()

asyncio.run(main())

Resources:

# TODO

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

aiomono-1.0.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

aiomono-1.0.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file aiomono-1.0.2.tar.gz.

File metadata

  • Download URL: aiomono-1.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Linux/5.8.0-53-generic

File hashes

Hashes for aiomono-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f7e1f0b73794ffb1e7d52ee10999331f563874d97f9de7fc2285c8d3cd99dafd
MD5 7670e6b66856c32f0ac8247521342147
BLAKE2b-256 4a3b4d1addb81bc6fcb18d6af83e84719ca114db758429f8de9ff31510b2fb64

See more details on using hashes here.

File details

Details for the file aiomono-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: aiomono-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Linux/5.8.0-53-generic

File hashes

Hashes for aiomono-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18633a0c6747536fc5e3baa2f170b00969a8f1cf81d1e89ffca745df5e688dac
MD5 99dbcc2a739432948a1c100d9ab08cba
BLAKE2b-256 2c1c7fbf5fda2b5d4fd3229a36eff6bedf2fce200fbf4449a6fd54ee08db0428

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