CosmPy
A python library for interacting with cosmos based blockchain networks
To Install
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
The full documentation can be found here.
Examples
Under the examples directory, you can find examples of basic ledger interactions using cosmpy, such as transferring tokens, staking, deploying and interacting with a smart contract, and performing atomic swaps.
Contributing
All contributions are very welcome! Remember, contribution is not only PRs and code, but any help with docs or helping other developers solve their issues are very appreciated!
Read below to learn how you can take part in the CosmPy project.
Code of Conduct
Please be sure to read and follow our Code of Conduct. By participating, you are expected to uphold this code.
Contribution Guidelines
Read our contribution guidelines to learn about our issue and pull request submission processes, coding rules, and more.
Development Guidelines
Read our development guidelines to learn about the development processes and workflows.
Issues, Questions and Discussions
We use GitHub Issues for tracking requests and bugs, and GitHub Discussions for general questions and discussion.
Metadata
Release files for cosmpy 0.12.2
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 |
|---|---|---|---|---|
| cosmpy-0.12.2.tar.gz | 265.9 kB | Without provenance | Details for cosmpy-0.12.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cosmpy-0.12.2-py3-none-any.whl | Python 3 | none | any | Details for cosmpy-0.12.2-py3-none-any.whl |
Total release size: 875.2 kB
Release files / cosmpy-0.12.2.tar.gz
| Download URL | cosmpy-0.12.2.tar.gz |
|---|---|
| Size | 265.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f225a2e9e4b6f9cc63fbf97bb72310da2d50dc9bbd56310ee12e737524ae7dfa
|
|
BLAKE2b-256 checksum How to use checksums |
8c934f0af49af66faaa07ef8d7ff53ad64b3ae524bc0cea6ce4142628f6556ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1013-azure
|
Release files / cosmpy-0.12.2-py3-none-any.whl
| Download URL | cosmpy-0.12.2-py3-none-any.whl |
|---|---|
| Size | 609.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0b4a51e04e8a7b9fb69377ecfbbf8a3349d7596db714b5d5dfdf308d41d54c5
|
|
BLAKE2b-256 checksum How to use checksums |
df3b7717cf69720fe9403ca26faf690db3a36b16e9a3811e5912236c75efab5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.10.20 Linux/6.17.0-1013-azure
|
Security for cosmpy 0.12.2
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.