OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Py Polkadot SDK

Py Polkadot SDK is a Python library for interfacing with Substrate nodes. It supports storage queries, extrinsic composition and submission, SCALE encoding and decoding, and utilities for runtime features and metadata. Applications can connect through an embedded light client or a node RPC endpoint.

Independent OpenViST project profile, based on linked sources.

Py Polkadot SDK — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when Python code needs to read Substrate storage or build runtime-aware transaction and data workflows through a light client or node RPC connection.

Who it is for

  • Python developers building scripts or applications for Substrate-based chains
  • Developers who need to query account or other on-chain storage
  • Teams building runtime-aware tools or handling SCALE data and extrinsics

Documented uses

  • Query account balances and other Substrate storage
  • Compose, sign and submit extrinsics
  • Encode and decode SCALE data
  • Use runtime metadata and properties in Python tools
Before you choose

Requirements & limits

The repository specifies an Apache-2.0 license. Installation is documented with pip using the package name `substrate-interface`.

  • Choose between the documented embedded light-client and node RPC connection patterns based on how the application will connect.
  • Automatic detection of properties such as SS58 format is described for most MetadataV14-and-later runtimes; older or developing runtimes may need manual configuration.
  • The documented transfer flow requires a keypair to sign the extrinsic.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Connect a Python script to a Substrate node

Install the library and initialize a connection using either an embedded light client or a node RPC endpoint.

Before you start

  • Python environment with pip
  • A chain specification for the embedded light-client option, or a node RPC endpoint for the RPC option

Steps

  1. Install the package with the command below.

    Documented command
    pip install substrate-interface
  2. Initialize SubstrateInterface with a chain specification and relay chain specifications for the embedded light-client option, or provide a node WebSocket URL such as ws://127.0.0.1:9944.

  3. For older runtimes or runtimes under development, set the SS58 format and other properties manually as needed.

Expected outcome

A `SubstrateInterface` instance initialized through one of the documented connection methods.

Guide limitations

  • Automatic property detection is described for most MetadataV14-and-later runtimes; older or developing runtimes may need manual settings.
Source-based practical guide

Query an account balance and submit a transfer extrinsic

Use the documented interface to read an account’s free balance and build, sign and submit a Balances transfer.

Before you start

  • An initialized SubstrateInterface connection
  • Account address and transfer destination
  • A keypair available to sign the extrinsic

Steps

  1. Query the System.Account storage entry for the account and read result.value['data']['free'].

  2. Compose a Balances.transfer call with the destination and value.

  3. Create a signed extrinsic from the call and keypair, then submit it with wait_for_inclusion=True.

  4. Read the returned receipt’s extrinsic and block hashes.

Expected outcome

The example workflow returns the account’s free-balance value and, after submission, a receipt identifying the extrinsic and block.

Guide limitations

  • The README’s signing example uses the development URI //Alice; it does not document key management for production use.
  • The example requests inclusion before returning a receipt; it does not establish transaction success in any particular environment.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
10 October 2026
Original website title
JAMdotTech/py-polkadot-sdk · Official homepage title · retained in its source language