Skip to main content

🍌🥧: Banano Python Library

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.

Setup

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 (https://api-beta.banano.cc) for API calls.

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

Development

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 https://github.com/milkyklim/bananopy.git
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.

Conversion

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.

Example

>>> import bananopy.banano as ban
Using https://api-beta.banano.cc as API provider on port 443

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

Support

Benis to ban_1dsarukqn5y8oqho43praocn97wjs17t8eppzgfb78nzzxmjapkidxrcgsqc

Metadata

Release files for bananopy 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bananopy 0.3.3
File Size Uploaded Provenance Actions
bananopy-0.3.3.tar.gz 9.0 kB Without provenance Details for bananopy-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bananopy 0.3.3
File Interpreter ABI Platform Actions
bananopy-0.3.3-py3-none-any.whl Python 3 none any Details for bananopy-0.3.3-py3-none-any.whl

Total release size: 17.2 kB

Release files / bananopy-0.3.3.tar.gz

Download URL bananopy-0.3.3.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
69473db3ad454b147363a48c7546bbbe4d6a7a384363852f01465b29c9ccb62c
BLAKE2b-256 checksum
How to use checksums
b89bb6b975c12d81e294bbc7c8e5d4fb4a9de66408afdc5012b2086d9ebda8d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.6.7 Darwin/18.7.0

Release files / bananopy-0.3.3-py3-none-any.whl

Download URL bananopy-0.3.3-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
863b23a5465172bd2b40af16bbf24fc0891c56df6a096a6f0458b56db9c1c1a6
BLAKE2b-256 checksum
How to use checksums
7209c94b9fb8295ff1245cc8dd6e88251d3e1820058025034caf2efbead663fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.6.7 Darwin/18.7.0

Security for bananopy 0.3.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page