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.3.tar.gz
(342.0 kB
view details)
Built Distribution
File details
Details for the file cosmpy-0.1.3.tar.gz
.
File metadata
- Download URL: cosmpy-0.1.3.tar.gz
- Upload date:
- Size: 342.0 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.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fc722770033da8ca906d2d211f39ae9f870c64b211f070f2ef881f4b01ff6c4 |
|
MD5 | 87dad8a4ab6202612bb5e8c37f23cf14 |
|
BLAKE2b-256 | fd8da9eb58672f61f51a4e90def517fb6a19339717b08fe9db362a0fd93ec041 |
File details
Details for the file cosmpy-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: cosmpy-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- 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.2 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63d27d049c54567ab74ac96a8829f2d5a201068c78d1f7489b993b383caa37eb |
|
MD5 | 577a73aef825a7e861f2e391e2633fa7 |
|
BLAKE2b-256 | 03510bf2838b8d5a1afb1d1a19cc293795d4c44abf1ee2b8597bdb8668bfc0ee |