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

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

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

cosmpy-0.5.0.tar.gz (810.3 kB view details)

Uploaded Source

Built Distribution

cosmpy-0.5.0-py3-none-any.whl (470.5 kB view details)

Uploaded Python 3

File details

Details for the file cosmpy-0.5.0.tar.gz.

File metadata

  • Download URL: cosmpy-0.5.0.tar.gz
  • Upload date:
  • Size: 810.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for cosmpy-0.5.0.tar.gz
Algorithm Hash digest
SHA256 cd60a1637ab0cab20c62ac3e17537e337d3f76fd89b11ef1e3e5007f0ae51f81
MD5 d63bc289de7c10ca32f11c22064f62c0
BLAKE2b-256 01f329ada4f9fe3dc155dc0b2d22c61efb62149f31ed2a5e973df2a9f1fbbf30

See more details on using hashes here.

File details

Details for the file cosmpy-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: cosmpy-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 470.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.9

File hashes

Hashes for cosmpy-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15c65063a5c10b7ff9ffd83aa35d8281dbf1b51b7da8b9b7a0e131fe517d5fa9
MD5 85c3edd85c523009443824638af76fe4
BLAKE2b-256 1a7843c7b335728b05ed1025fae93f051e37cd9e7308e478f45a3bfda93072e3

See more details on using hashes here.

Supported by

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