Skip to main content

The Monobank API wrapper for Python

Project description

monobank-api - The Monobank API wrapper for Python

GitHub-issues

Python client for Monobank open API (https://api.monobank.ua/docs/)

Installation

pip install monobank-api

or add to to your requirements.txt monobank-api==0.1.1 and run

pip install -r requirements.txt

Usage

Without authorization

Monobank open API allows making certain requests without any authorization.

from monobank_api import BaseAPI

mono = BaseAPI()
currencies = mono.get_currency()

Personal token

Request and activate your token at https://api.monobank.ua

from monobank_api import PersonalAPI

PERSONAL_TOKEN = "copy token here"

Authorization request

The corporate API documentation (https://api.monobank.ua/docs/corporate.html)

To use this authorization method, you'll need to generate a key and contact Monobank team.

Generate private key

openssl ecparam -genkey -name secp256k1 -out private_key.key

NOTE: Do not share this key with anyone.

Generate public key

openssl ec -in private_key.key -pubout > public_key.pub

For more information check the Monobank API documentation.

Usage example

from monobank_api import CorporateAPI

# the url has to be used by the user to confirm authorization
mono = CorporateAPI.request_auth("./private_key.pem")

if mono.check_auth():
    user_info = mono.get_client_info()

License

The MIT License (MIT). Please see License for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

monobank_api-0.1.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file monobank_api-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: monobank_api-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for monobank_api-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e56c41e7a660782b97a0230c2b5ed9ab2a665d0a171cf4e5f566c013e6c15df3
MD5 7ec86e360f77c8a6193ed24752c03878
BLAKE2b-256 d21d6769130248a6c2ba8f2b814e386d824e5156d65c1b208d3dc67887d578e1

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