Python implementation of Cryptomus public API
This library is developing for my personal needs, so it may not fully implement API. However I will continue to maintain it, so if you need some not implemented methods - just open an issue.
Installation using pip (a Python package manager):
$ pip install pyCryptomusAPI
Everything is as simple as the API itself.
- Create pyCryptomusAPI instance
- Access API methods in pythonic notation (e.g. "Creating an invoice" -> create_invoice())
- Most methods return result as correspondent class, so you can access data as fields
from pyCryptomusAPI import pyCryptomusAPI
client = pyCryptomusAPI(
"xxxx-xxxx-xxxx-xxxx-xxxx", # Merchand UUID
payment_api_key="xxxxxxx", # Payment API key (for payment methods)
payout_api_key="xxxxxxx") # Payout API key (for payout methods)
balance = client.balance()
for item in balance.merchant:
print("Merchant balance: {} {}".format(item.balance, item.currency_code))
You can also check tests.py.
Exceptions are rised using pyCryptomusAPIException class.