Skip to main content

A library for interacting with the cosmos networks

Project description

CosmPy

A python library for interacting with cosmos based blockchain networks

PyPI PyPI - Python Version License
PyPI - Wheel CosmPy sanity checks and tests Download per Month

We recently stopped using the develop branch for feature consolidation and renamed master to main. Please see the Contribution Guides for up-to-date instructions.

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.

License

The CosmPy project is licensed under Apache License 2.0.

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.8.0.tar.gz (195.8 kB view details)

Uploaded Source

Built Distribution

cosmpy-0.8.0-py3-none-any.whl (403.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cosmpy-0.8.0.tar.gz
  • Upload date:
  • Size: 195.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1037-azure

File hashes

Hashes for cosmpy-0.8.0.tar.gz
Algorithm Hash digest
SHA256 bccc45fc1bcbc8a056592156747d24aaf31acb5edb486e34120280d965181de2
MD5 1a83d56102825a5330bd38935da1bcb6
BLAKE2b-256 766881d0e02fb55ebca4df2458d562d9e3287335ddac4b04f01d3c6f37631005

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cosmpy-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 403.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1037-azure

File hashes

Hashes for cosmpy-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 29895ed00e1b75f40f3e26abfcfecb3c944d911922ed7f907e6da1cdd9cf9e3e
MD5 d6120cf70f89ee71bc4be01c5a750ffa
BLAKE2b-256 44055611368f43911f1d495d604f7ba4957d46ae8f0c2467c5581399bca375d4

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