Skip to main content

A library for interacting with the cosmos networks

Project description

CosmPy

PyPI PyPI - Python Version PyPI - Wheel License

AEA framework sanity checks and tests Contributor Covenant

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:

http://127.0.0.1:8000/cosmpy/

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_aea_cosmpy-0.6.3.tar.gz (194.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_aea_cosmpy-0.6.3-py3-none-any.whl (404.3 kB view details)

Uploaded Python 3

File details

Details for the file open_aea_cosmpy-0.6.3.tar.gz.

File metadata

  • Download URL: open_aea_cosmpy-0.6.3.tar.gz
  • Upload date:
  • Size: 194.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.10 Linux/6.2.0-24-generic

File hashes

Hashes for open_aea_cosmpy-0.6.3.tar.gz
Algorithm Hash digest
SHA256 0d8997590a1fa1c936cf55106638ded7c3b74278d51129be436fbdf5078beb4b
MD5 03b61648acb153d2cd9d2b1d781dfbe2
BLAKE2b-256 398be188b71cc6faa3bc61d905679cc8d3390e85854fdf50a3cd22702b1c51cc

See more details on using hashes here.

File details

Details for the file open_aea_cosmpy-0.6.3-py3-none-any.whl.

File metadata

  • Download URL: open_aea_cosmpy-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 404.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.10 Linux/6.2.0-24-generic

File hashes

Hashes for open_aea_cosmpy-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5a2718b02bd9acf6257d69dacd048f4b81b8313c1f300f4b209ae20fd94626fa
MD5 7e5e3e2082da82c412ddadfa3eb90ce8
BLAKE2b-256 bb4c40c699b2d312954d85092212d273ecc66855e09f7abc7b83621b3df9b94c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page