Skip to content
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

Galadrin/cosmpy

Repository files navigation

Cosmpy

Checks amd Tests

A python library for interacting with cosmos based blockchain networks

Installing

To install the project use:

pip3 install cosmpy

Getting started

Below is a simple example using the SigningCosmWasmClient and the RestClient channel.

from cosmpy.clients.signing_cosmwasm_client import SigningCosmWasmClient
from cosmpy.common.rest_client import RestClient

channel = RestClient("http:https://<rest endpoint addres>")
client = SigningCosmWasmClient(private_key, channel, "<chain id>")

res = client.get_balance(client.address, "stake")
print(f"Balance: {res.balance.amount} {res.balance.denom}")

Extra Resources

About

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

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 98.6%
  • Makefile 1.1%
  • Shell 0.3%