Skip to main content

Python library for interaction with Banano

Project description

License Build Status Documentation Status Supported Python Versions Package Version Banano Node Version

🍌🥧 is a python wrapper for Banano node communication. It takes care of RPC responses (type conversions) and exposes a pythonic API for making RPC calls.

Full list of RPC calls is coming from docs.


pip install bananopy

Bananopy checks if BANANO_HTTP_PROVIDER_URI environment variable is set.

To set it run:

export BANANO_HTTP_PROVIDER_URI=<ip_address>

Otherwise, bananopy will fallback and use public node ( for API calls.

Note: Public node is running Banano Node v18, meaning some requests might fail.


Repository uses poetry to keep track of dependances. Once you have poetry installed make sure you are on Python 3.7+ and run these commands:

git clone
poetry install

To run the tests:

poetry run pytest -v

Note: Only public requests are actually tested. Dangerous RPC calls controlled by enable_control are checked for error response only.


float type is not supported in conversion, e.g. ban_to_banoshi cause it might lead to unexpected precision loss. Use str, int or Decimal types instead.


>>> import bananopy.banano as ban
Using as API provider on port 443

>>> account = "ban_1bananobh5rat99qfgt1ptpieie5swmoth87thi74qgbfrij7dcgjiij94xr"
>>> ban.account_balance(account)
{'balance': 1626688000000000000017763568393401, 'pending': 0}


Benis to ban_1dsarukqn5y8oqho43praocn97wjs17t8eppzgfb78nzzxmjapkidxrcgsqc

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

bananopy-0.3.3.tar.gz (9.0 kB view hashes)

Uploaded source

Built Distribution

bananopy-0.3.3-py3-none-any.whl (8.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page