🍌🥧 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)
| File | Size | Uploaded | |
|---|---|---|---|
| bananopy-0.3.3.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bananopy-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
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
|