A library for interacting with the cosmos networks
Project description
Cosmpy
A python library for interacting with cosmos based blockchain networks
Installing
To install the project use:
pip3 install cosmpy
Getting started
Below is a simple example using the SigningCosmWasmClient
and the RestClient
channel.
from cosmpy.clients.signing_cosmwasm_client import SigningCosmWasmClient
from cosmpy.common.rest_client import RestClient
channel = RestClient("http://<rest endpoint addres>")
client = SigningCosmWasmClient(private_key, channel, "<chain id>")
res = client.get_balance(client.address, "stake")
print(f"Balance: {res.balance.amount} {res.balance.denom}")
Extra Resources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cosmpy-0.1.4.tar.gz
(342.8 kB
view hashes)
Built Distribution
cosmpy-0.1.4-py3-none-any.whl
(373.7 kB
view hashes)