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 details)
Built Distribution
cosmpy-0.1.4-py3-none-any.whl
(373.7 kB
view details)
File details
Details for the file cosmpy-0.1.4.tar.gz
.
File metadata
- Download URL: cosmpy-0.1.4.tar.gz
- Upload date:
- Size: 342.8 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.22.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf462e70795800ee72ca286f128c515bfe262d8e6228cc22ac6d511317297dbd |
|
MD5 | 5c50ad5e89e8ef27de111b0ac86c2d34 |
|
BLAKE2b-256 | 6e8760bf511613b50544c189137dd51ce07c6a529e89c214734a5a2dc05e67ea |
File details
Details for the file cosmpy-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: cosmpy-0.1.4-py3-none-any.whl
- Upload date:
- Size: 373.7 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.22.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5140d7cd4eb755e52a1433fdaa9f4a0fb05e27f6439c3b6a357177d0e2d901c |
|
MD5 | 8eca06ad398e1100b0989b2a7d308c44 |
|
BLAKE2b-256 | fc7bc82aa7ac5acb596f2adc7893db154cd7365e3620467798d9a0488e42ca33 |