About
Python-chianode is a Python wrapper for Chia blockchain full node APIs.
The package supports the official RPC API for Chia nodes running on localhost, as well as the Mojonode API. Calls are made asynchronously, and it is possible to receive streaming responses.
Mojonode provides advanced REST calls not available via the official RPC interface, blockchain data via SQL query, and an event stream for blockchain and mempool events. Note that Mojonode does not implement all official RPCs. The get_routes endpoint returns a list of available endpoints.
Installation
To install python-chianode, run
pip install python-chianode
Quick start
Import and instantiate the Chia node client in your Python file as follows
from chianode.mojoclient import MojoClient
node = MojoClient()
By default, both MojoClient and RpcClient connect to Mojonode. To connect to a local node only, do
from chianode.rpcclient import RpcClient
from chianode.constants import LOCALHOST
node = RpcClient(base_url=LOCALHOST)
To use Mojonode in conjunction with a local node, do
from chianode.mojoclient import MojoClient
from chianode.constants import LOCALHOST
node = MojoClient(base_url=LOCALHOST)
More detailed examples on how to use the wrapper can be found in example_rpc.py and example_events.py files.
Metadata
Release files for python-chianode 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_chianode-0.1.1.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_chianode-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / python_chianode-0.1.1.tar.gz
| Download URL | python_chianode-0.1.1.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1861099a4ed025e9bc4f7ba17d9124783ead7a50e9da5014a40b628ede2da7f
|
|
BLAKE2b-256 checksum How to use checksums |
723d08c6c7426c2545d0ad8458b102f283b8d6caf7f6edeba5cc313f9583778b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0
|
Release files / python_chianode-0.1.1-py3-none-any.whl
| Download URL | python_chianode-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1a2cd4e0bd315541cfd8555d645e7fec993ecff735a12ee448d5df1407d66d0
|
|
BLAKE2b-256 checksum How to use checksums |
27504be30f02fa84d831c27e365ca564d586779a1a140de7d8b8f35028008c45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0
|