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 library use:
pip3 install cosmpy
Getting Started
Below is a simple example for querying an account's balances:
from cosmpy.aerial.client import LedgerClient, NetworkConfig
# connect to Fetch.ai network using default parameters
ledger_client = LedgerClient(NetworkConfig.fetchai_mainnet())
alice: str = 'fetch12q5gw9l9d0yyq2th77x6pjsesczpsly8h5089x'
balances = ledger_client.query_bank_all_balances(alice)
# show all coin balances
for coin in balances:
print(f'{coin.amount}{coin.denom}')
Documentation
Before running this command make sure your development environment is set up. Check Development setup for more details.
To see the documentation:
make docs-live
Then navigate to the following URL in your browser:
Examples
Under the examples
directory, you can find examples of basic ledger interactions using cosmpy
e.g. transferring tokens, staking, deploying and interacting with a smart contract, and performing atomic swaps.
To contribute
Please see CONTRIBUTING and DEVELOPING guides.
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
Built Distribution
File details
Details for the file cosmpy-0.6.1.tar.gz
.
File metadata
- Download URL: cosmpy-0.6.1.tar.gz
- Upload date:
- Size: 195.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.15 Linux/5.15.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98e2a939e1ee671c462fe86b2e8b85091bb85f4c19c87617b30e7d588069d462 |
|
MD5 | ffd3b4d300cd09aeb6e4612aec08478c |
|
BLAKE2b-256 | e724560668168794d73efab9b4e3f7b24b4127a6052fa2f5fc3910282780e963 |
File details
Details for the file cosmpy-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: cosmpy-0.6.1-py3-none-any.whl
- Upload date:
- Size: 403.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.9.15 Linux/5.15.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 496a6dbd9ff8f96661d83880412020f7cfd62678f7ccfd48bf867b1a1ff428c7 |
|
MD5 | 321f3ca3604aadb9c992f36c23323ef5 |
|
BLAKE2b-256 | cf0c285dd208eeb02d26c239bb8086033bb774a2cc3462f5e36d64629c6184be |