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.2.tar.gz
(357.2 kB
view details)
Built Distribution
cosmpy-0.1.2-py3-none-any.whl
(742.2 kB
view details)
File details
Details for the file cosmpy-0.1.2.tar.gz
.
File metadata
- Download URL: cosmpy-0.1.2.tar.gz
- Upload date:
- Size: 357.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0c863176bb5cf5667f5a2ce4cf6cdbaea3bc1569c12c0077e403ac2dcf9555f |
|
MD5 | af9c4440603979feed6932c10ac1b571 |
|
BLAKE2b-256 | de201eab6200d3524134c689a4fa0db4f37c5c3068acfd41eb59c998ded94d9f |
File details
Details for the file cosmpy-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: cosmpy-0.1.2-py3-none-any.whl
- Upload date:
- Size: 742.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e49e176f870c9788916f9bcf697c11dce07a7b7b58be76a44ac8975e0d42c095 |
|
MD5 | e75ad73ad4216611fcd58726da99c3fd |
|
BLAKE2b-256 | 4aef5cef6d5062beb8930464e4d90c79258eee0d22d3a5d90f2f273a32c3e6b3 |