A Python library for interfacing with Substrate blockchains, enabling storage queries, extrinsic composition, and SCALE encoding/decoding.
Python Substrate Interface is a Python library designed to interface with Substrate-based blockchain nodes. It enables developers to query storage, compose and submit extrinsics (transactions), and handle SCALE encoding/decoding, which are core tasks for building applications on networks like Polkadot and Kusama. The library abstracts the complexities of direct RPC interactions and runtime metadata management.
Python developers building applications, bots, or tools that interact with Substrate-based blockchains such as Polkadot, Kusama, Acala, or Moonbeam.
It offers a high-level, Pythonic API that simplifies blockchain interactions, automates runtime property detection, and supports both RPC and light client connections, making it a versatile choice for Substrate development.
Python Polkadot SDK
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically queries RPC nodes to determine properties like ss58_format for modern runtimes (MetadataV14+), reducing manual configuration as highlighted in the initialization section.
Provides convenient methods for common tasks such as balance queries and extrinsic composition, simplifying blockchain interactions with Pythonic APIs, as shown in the quick usage examples.
Handles SCALE encoding and decoding essential for Substrate data handling, enabling seamless interaction with runtime metadata without manual binary parsing.
Supports both WebSocket RPC endpoints and embedded light clients, offering flexibility for centralized or decentralized access, as described in the initialization examples.
As admitted in the README, for older or under-development runtimes, manual configuration of ss58_format and other properties is required, which can be cumbersome for outdated networks.
Tied exclusively to the Python ecosystem, making it unsuitable for projects requiring multi-language integrations or non-Python environments like browsers or mobile apps.
Using the embedded light client requires additional chainspec configuration (e.g., relay_chainspecs), which adds complexity compared to simple RPC connections.