--- id: cosmpy version: "0.12.2" license: Apache-2.0 license_treatment: permissive maintenance: active --- # cosmpy — A library for interacting with the cosmos networks License: permissive · Maintenance: active · Downloads: 83.7K/mo ## What it is and what it does CosmPy is a Python client library for Cosmos SDK-based blockchains, primarily designed for the Fetch.ai network. It abstracts the complexity of blockchain interaction by providing high-level methods for common operations: querying account balances, transferring tokens, staking, and deploying or calling smart contracts. The library handles cryptographic signing, network communication via gRPC, and protocol buffer serialization internally. The package is built on a foundation of established cryptographic and serialization dependencies (bcrypt, ecdsa, pycryptodome, protobuf, grpcio) and is actively maintained with recent releases. It targets developers building applications on Cosmos networks who want to avoid low-level protocol details. The library is in Alpha status, meaning the API may evolve, but it has been in development since 2021 and is actively used. Use it for: - Query account balances and transaction history on Cosmos-based networks without running a full node. - Build automated token transfer or staking workflows that interact with blockchain accounts programmatically. - Deploy and interact with smart contracts on Cosmos networks from Python applications. - Integrate blockchain operations into backend services or data pipelines that need to read or write blockchain state. - Perform atomic swaps or multi-step transactions that require coordination across blockchain operations. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. CosmPy provides Python bindings to interact with Cosmos SDK-based blockchain networks, enabling account queries, token transfers, staking, and smart contract interactions. Yes, if you are building on Cosmos SDK networks (especially Fetch.ai). The library is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive license. The Alpha status means the API may change, so pin the version in production. Not relevant for non-Cosmos blockchain work. ## Install pip install cosmpy uv add cosmpy poetry add cosmpy ## Installing cosmpy Before you install: Low friction installation with a pure-Python wheel. Active maintenance with a recent release 80 days ago and ongoing commits. Supports Python 3.10 through 3.14. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most projects. Quickstart: pip install cosmpy from cosmpy.aerial.client import LedgerClient, NetworkConfig ledger_client = LedgerClient(NetworkConfig.fetchai_mainnet()) balances = ledger_client.query_bank_all_balances('fetch12q5gw9l9d0yyq2th77x6pjsesczpsly8h5089x') for coin in balances: print(f'{coin.amount}{coin.denom}') Requires Python 3.10 or later; depends on 14 runtime packages including cryptographic libraries (bcrypt, ecdsa, pycryptodome, pynacl). Verify before relying: - Whether the library supports networks beyond Fetch.ai mainnet or if other Cosmos chains are documented. - Performance characteristics when querying large account histories or performing batch operations. - Whether smart contract deployment and interaction examples cover all major contract types. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 83.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cosmos blockchain python client, cosmos sdk interaction library, fetch.ai network integration, blockchain account queries python, cosmos token transfer library, cosmos staking python, cosmos smart contract interaction, blockchain, cosmos-sdk, cryptography [View on SkillFed](https://skillfed.io/packages/cosmpy) · [View on PyPI](https://pypi.org/project/cosmpy/)