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
Metadata
Release files for open-aea-cosmpy 0.6.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| open_aea_cosmpy-0.6.7.tar.gz | 197.3 kB | Without provenance | Details for open_aea_cosmpy-0.6.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| open_aea_cosmpy-0.6.7-py3-none-any.whl | Python 3 | none | any | Details for open_aea_cosmpy-0.6.7-py3-none-any.whl |
Total release size: 601.6 kB
Release files / open_aea_cosmpy-0.6.7.tar.gz
| Download URL | open_aea_cosmpy-0.6.7.tar.gz |
|---|---|
| Size | 197.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5904179da61d632abda7a7ab93911e088c6669bb0c6c8de7461f3a7180a9dfc7
|
|
BLAKE2b-256 checksum How to use checksums |
b1937796195c0e02d93de0c43fa561130603ce327a9d25f274f8406eb5f80430
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Release files / open_aea_cosmpy-0.6.7-py3-none-any.whl
| Download URL | open_aea_cosmpy-0.6.7-py3-none-any.whl |
|---|---|
| Size | 404.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
85a7590f0f07da1f2fd54b1d981c94f581f9b1692cc99c8c2257dff7de108c68
|
|
BLAKE2b-256 checksum How to use checksums |
c6921237ead54a06ab186a70d6e262f4fc53988ca8719ebaac0858c543041822
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.0
|
Security for open-aea-cosmpy 0.6.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.