Skip to main content

A library for interacting with the cosmos networks

Project description

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://<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

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.1.4.tar.gz (342.8 kB view hashes)

Uploaded Source

Built Distribution

cosmpy-0.1.4-py3-none-any.whl (373.7 kB view hashes)

Uploaded Python 3

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