AIOMonobank
Asynchronous Python library for monobank API
Setup
You get token for your client from MonobankAPI.
Install the latest version of the aiomonobank: pip install aiomonobank
Examples
We currently have 2 different classes for using the Monobank API:
MonoPublic is simple base class for others, can only get currencies
MonoPersonal - this class for talk to personal Monobank API
get_currency request
import json
import asyncio
from aiomonobank import MonoPublic, types
async def main():
async with MonoPublic() as mono_client:
currencies: list[types.Currency] = await mono_client.get_currency()
for currency in currencies:
print(currency)
if __name__ == '__main__':
asyncio.run(main())
get_client_info request
import asyncio
from aiomonobank import MonoPersonal
MONOBANK_API_TOKEN = 'your_token'
async def main():
mono_client = MonoPersonal(MONOBANK_API_TOKEN)
try:
client_info = await mono_client.get_client_info()
print(f"Client name: {client_info.name}")
print(client_info)
finally:
await mono_client.close()
if __name__ == '__main__':
asyncio.run(main())
get_statement request
import asyncio
from datetime import datetime, timedelta
from aiomonobank import MonoPersonal
MONOBANK_API_TOKEN = 'your_token'
async def main():
mono_client = MonoPersonal(MONOBANK_API_TOKEN)
try:
transactions = await mono_client.get_statement(
account_id='0',
from_datetime=datetime.utcnow() - timedelta(days=3),
to_datetime=datetime.utcnow() - timedelta(days=2)
)
for transaction in transactions:
print(transaction)
finally:
await mono_client.close()
if __name__ == '__main__':
asyncio.run(main())
Resources:
PyPI: aiomonobank
Documentation: (soon)
Metadata
Release files for aiomonobank 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiomonobank-1.0.2.tar.gz | 13.3 kB | Without provenance | Details for aiomonobank-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiomonobank-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for aiomonobank-1.0.2-py3-none-any.whl |
Total release size: 29.6 kB
Release files / aiomonobank-1.0.2.tar.gz
| Download URL | aiomonobank-1.0.2.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f43893077ad7b744391e543ef40b44ed0243a3b4dc9d871e1c2acdb1f3eb85a
|
|
BLAKE2b-256 checksum How to use checksums |
899f559fcbf1cc7dbf5ffd7cda7375bb964f4719a41958dff506141a8c090cc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / aiomonobank-1.0.2-py3-none-any.whl
| Download URL | aiomonobank-1.0.2-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24a80d9a66a5dfb39fee7dd5e4e72345e5ce1a9661043f9f2f96dd136580c275
|
|
BLAKE2b-256 checksum How to use checksums |
4d7a85b262faa1f87dac17cb01b8aca860f08ad4b8596f0ec20fd01b11c0198c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for aiomonobank 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.