Python SDK for the Cosmos Ecosystem
(Unfamiliar with Cosmos? Check out the Cosmos Network Docs)
This (SDK) in Python is a simple library toolkit for building software that can interact with the supported Cosmos blockchains and provides simple abstractions over core data structures, serialization, key management, and API request generation.
Note - This is currently a W.I.P.
Features
- This SDK follows a module specific approach, and new Cosmos Modules will be added to the SDK on a priority basis.
- Written in Python with extensive support libraries
- Versatile support for key management solutions
❗ This SDK currently does not support Terra Classic. If you want to communicate with Terra Classic, use terra-sdk==2.x
Requirements
Cosmos.py SDK requires Python v3.7+.
Installation
NOTE: All code starting with a $ is meant to run on your terminal (a bash prompt). All code starting with a >>> is meant to run in a python interpreter, like ipython.
Cosmos SDK can be installed (preferably in a virtual environment from PyPI using pip) as follows:
$ pip install -U cosmos_SDK
You might have pip3 installed instead of pip; proceed according to your own setup.
Usage Examples
from cosmos_sdk.client.lcd import LCDClient
from cosmos_sdk.key.mnemonic import MnemonicKey
mnemonic = <MNEMONIC_PHRASE>
# Terra client
terra_client = LCDClient(chain_id="phoenix-1", url="https://phoenix-lcd.terra.dev")
mk = MnemonicKey(mnemonic,"terra")
terra_wallet = terra_client.wallet(mk)
# Persistence client
persistence_client = LCDClient(chain_id="core-1", url="http://rest.core.persistence.one")
mk = MnemonicKey(mnemonic,"persistence")
persistence_wallet = persistence_client.wallet(mk)
Dependencies
Cosmos SDK uses Poetry to manage dependencies. To get set up with all the required dependencies, run:
$ pip install poetry
$ poetry install
If you encounter "version solving failed." error, try poetry add <package_name>, followed by poetry lock and then poetry install
Contributing
Community contribution, whether it's a new feature, correction, bug report, additional documentation, or any other feedback is always welcome. Please read through this section to ensure that your contribution is in the most suitable format for us to effectively process.
License
This reporitory was forked from Terra SDK and is being repurposed from there on.
Metadata
Release files for cosmos-sdk 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cosmos-sdk-0.0.3.tar.gz | 82.9 kB | Without provenance | Details for cosmos-sdk-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cosmos_sdk-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for cosmos_sdk-0.0.3-py3-none-any.whl |
Total release size: 208.4 kB
Release files / cosmos-sdk-0.0.3.tar.gz
| Download URL | cosmos-sdk-0.0.3.tar.gz |
|---|---|
| Size | 82.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
338bed5c8654edb77b420cb540371c7bf174c7f20bf6b55e47a12d6f7e9bfbaa
|
|
BLAKE2b-256 checksum How to use checksums |
c51d5577dc766aae45979c90512b1f729e69ce43cb535504d6aa40eb0a4f6b2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0 CPython/3.10.6 Darwin/21.5.0
|
Release files / cosmos_sdk-0.0.3-py3-none-any.whl
| Download URL | cosmos_sdk-0.0.3-py3-none-any.whl |
|---|---|
| Size | 125.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fca92752656e77706f5e78d8b0476af297ccc4f6dba725cf75f46b79df609551
|
|
BLAKE2b-256 checksum How to use checksums |
a7e40e9df1e201be2b715a08d58eeb48fb20b5f3073b4936c98c57a02b591149
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.0 CPython/3.10.6 Darwin/21.5.0
|
Security for cosmos-sdk 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.