Skip to main content

Abstractions for the Polkadot ecosystem

Project description

PyPolkadot

Abstractions for the Polkadot ecosystem.

This package is a very opinionated wrapper around py-substrate-interface. It provides a simple synchronous interface for interacting with the Polkadot ecosystem. The PyPolkadot package can automatically detect when the metadata is outdated and refresh it behind the scenes. This ensures that developers don’t have to manually handle metadata updates.

Note: Light client functionality is not yet supported.

Installation

pip install PyPolkadot

Usage

Basic usage

from polkadot_gateway import Polkadot

# Initialize Polkadot instance
polka = Polkadot()  # Defaults to the mainnet relay chain

# Optionally, specify a custom RPC endpoint or use a testnet
polka = Polkadot(endpoint="wss://polkadot-rpc-tn.dwellir.com")

# Get account balance
balance = polka.get_balance("12pDATAH2rCakrYjo6UoYFtmTEUpSyePTum8U5x9QdySZuqn")
print(f"Balance: {balance} DOT")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypolkadot-0.1.0.tar.gz (39.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pypolkadot-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (5.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

PyPolkadot-0.1.0-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file pypolkadot-0.1.0.tar.gz.

File metadata

  • Download URL: pypolkadot-0.1.0.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for pypolkadot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8e42a1b846088626330f3f9c4545aa84f80157151f23ef58bc43bd7279334ef1
MD5 d431e70f8b004cfe90bc1743eaa7b6b0
BLAKE2b-256 28bc829ddc53a414eedf159b99dc1e054d7bf4f8a4c1e149917678cd5d2e3dde

See more details on using hashes here.

File details

Details for the file pypolkadot-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pypolkadot-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 475311ded6266d74de38b31e18217ac9007d0a5c7fc39d9b44f11f5baaccbb02
MD5 e7caabb842663bcef1231ab150e9b6ed
BLAKE2b-256 f8736414a8d95cec859f1a90fe2de673e36f26d42134c721823ab6c8400dd77e

See more details on using hashes here.

File details

Details for the file PyPolkadot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: PyPolkadot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for PyPolkadot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 43a0c08ab8776fb55f224708a42f57f56b0835218f39641f9add65e2088173e4
MD5 ee016fa807496dcfc1073b3c6ad3b9a6
BLAKE2b-256 ca19a64c534eaa7a9c8a3bab9540af0e0d279dc2cbc1f563023e732a53b3f504

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page