Skip to content
/ cosmpy Public
forked from fetchai/cosmpy

A Python client library for interacting with blockchains based on the Cosmos-SDK

License

Notifications You must be signed in to change notification settings

xala19/cosmpy

 
 

Repository files navigation

CosmPy

Official Website PyPI CosmPy sanity checks and tests Download per Month Twitter Follow

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.

About

A Python client library for interacting with blockchains based on the Cosmos-SDK

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Makefile 1.1%
  • Shell 0.2%