{"id":23456,"library":"cosmpy","title":"cosmpy","description":"A Python library for interacting with Cosmos SDK-based blockchains. Supports transaction creation, signing, and querying. Current version 0.11.2 (latest stable), with release candidates for 0.12.0 targeting Cosmos SDK v0.53.4. Release cadence is irregular, with several minor versions per year.","status":"active","version":"0.11.2","language":"python","source_language":"en","source_url":"https://github.com/fetchai/cosmpy","tags":["cosmos","blockchain","cosmos-sdk","crypto","web3"],"install":[{"cmd":"pip install cosmpy","lang":"bash","label":"stable"}],"dependencies":[],"imports":[{"wrong":"from cosmpy.clients import LedgerClient","symbol":"LedgerClient","correct":"from cosmpy import LedgerClient"}],"quickstart":{"code":"from cosmpy.clients import LedgerClient\nfrom cosmpy.wallet import Wallet\n\n# Connect to a Cosmos node\nclient = LedgerClient(\"https://rpc.cosmos.network:26657\")\n\n# Create a wallet from a mnemonic (use env var for security)\nimport os\nmnemonic = os.environ.get(\"MNEMONIC\", \"\")\nwallet = Wallet.from_mnemonic(mnemonic)\n\n# Query balance\nbalance = client.query_bank_balance(wallet.address(), \"uatom\")\nprint(balance)","lang":"python","description":"Connect to a Cosmos node, create a wallet from a mnemonic, and query a balance."},"warnings":[{"fix":"Use 'from cosmpy.clients import LedgerClient'.","message":"Import path for clients is cosmpy.clients (plural). Many examples show 'cosmpy.client' which does not exist.","severity":"gotcha","affected_versions":">=0.8.0"},{"fix":"Use 'from cosmpy.wallet import Wallet'.","message":"Wallet class moved from cosmpy.crypto to cosmpy.wallet in v0.8.0.","severity":"gotcha","affected_versions":">=0.8.0"},{"fix":"Use 'from cosmpy.clients import StargateClient' instead.","message":"The 'LedgerClient' is not available in v0.12.0rc* (replaced by 'StargateClient'). If you upgrade to v0.12.0rc, update imports.","severity":"gotcha","affected_versions":"0.12.0rc0,0.12.0rc1"},{"fix":"Check the chain's coin denom (e.g., 'uatom', 'uosmo', etc.).","message":"When 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure the RPC URL is correct and the node is accessible. Use client.ping() to test connectivity.","message":"Transaction broadcasting requires a client with a valid connection. Timeout errors often occur if RPC endpoint is unreachable.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.11.2':21 '0.12.0':28 'base':11 'blockchain':12,44 'cadenc':34 'candid':26 'cosmos':8,30,43,46 'cosmos-sdk':45 'cosmpi':1 'creation':15 'crypto':48 'current':19 'interact':6 'irregular':36 'latest':22 'librari':4 'minor':39 'per':41 'python':3 'queri':18 'releas':25,33 'sdk':10,31,47 'sdk-base':9 'sever':38 'sign':16 'stabl':23 'support':13 'target':29 'transact':14 'v0.53.4':32 'version':20,40 'web3':49 'year':42","created_at":"2026-05-01T08:07:52.645096+00:00","updated_at":"2026-05-01T08:07:52.645096+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'LedgerClient' from 'cosmpy' (/tmp/tmpn053sl2s/venv/lib/python3.12/site-packages/cosmpy/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.12.2","cli_name":"","cli_version":null,"type":"library","homepage":"https://cosmpy.org","github":"https://github.com/fetchai/cosmpy","docs":"https://network.fetch.ai/docs/guides/cosmpy/installation/","changelog":null,"pypi":"https://pypi.org/project/cosmpy/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","http-networking","auth-security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}