Install & Compatibility
Where this runs
tested against v0.12.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 82.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 6.9s · import 0.000s · 80MB
81MB installed
● package 81MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
LedgerClient
✓ from cosmpy import LedgerClient
✗ from cosmpy.clients import LedgerClient
Connect to a Cosmos node, create a wallet from a mnemonic, and query a balance.
from cosmpy.clients import LedgerClient
from cosmpy.wallet import Wallet
# Connect to a Cosmos node
client = LedgerClient("https://rpc.cosmos.network:26657")
# Create a wallet from a mnemonic (use env var for security)
import os
mnemonic = os.environ.get("MNEMONIC", "")
wallet = Wallet.from_mnemonic(mnemonic)
# Query balance
balance = client.query_bank_balance(wallet.address(), "uatom")
print(balance)
Debug
Known issues
gotchaImport path for clients is cosmpy.clients (plural). Many examples show 'cosmpy.client' which does not exist.fixUse 'from cosmpy.clients import LedgerClient'.
affects: >=0.8.0
gotchaWallet class moved from cosmpy.crypto to cosmpy.wallet in v0.8.0.fixUse 'from cosmpy.wallet import Wallet'.
affects: >=0.8.0
gotchaThe 'LedgerClient' is not available in v0.12.0rc* (replaced by 'StargateClient'). If you upgrade to v0.12.0rc, update imports.fixUse 'from cosmpy.clients import StargateClient' instead.
affects: 0.12.0rc0,0.12.0rc1
gotchaWhen querying balances, the denomination string must match the chain's coin type (e.g., 'uatom' for Cosmos Hub). Using a wrong denomination returns zero or error.fixCheck the chain's coin denom (e.g., 'uatom', 'uosmo', etc.).
affects: all
gotchaTransaction broadcasting requires a client with a valid connection. Timeout errors often occur if RPC endpoint is unreachable.fixEnsure the RPC URL is correct and the node is accessible. Use client.ping() to test connectivity.
affects: all
Upgrade
Version history
0.12.2latest on PyPI · released May 26, 2026
Audit
Dependencies
No dependency data recorded yet.