Registry / blockchain / pytoniq

pytoniq

JSON →
library0.1.43pypypiunverified

A Python SDK for interacting with the TON Blockchain, providing client, wallet, and contract utilities. Current version 0.1.43, under active development with frequent releases.

pip install pytoniq
INSTALL
IMPORT
SIG · PYTONIQ
P
pytoniq
blockchainpythonv0.1.43
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TonClient
from pytoniq import TonClient
from pytoniq import TonClient

Initialize a TON client and fetch masterchain info. Set TON_API_KEY environment variable.

import os from pytoniq import TonClient client = TonClient(api_key=os.environ.get('TON_API_KEY', '')) print(client.get_masterchain_info())
Debug
Known issues
breakingAPI break: TonClient constructor changed in v0.1.35 from positional to keyword argument 'api_key'.
fix
Use TonClient(api_key='...') instead of TonClient('...')
affects: >=0.1.35
deprecatedWallet class: use 'create_wallet' helper instead of instantiating Wallet directly.
fix
Use create_wallet(client, ...) from pytoniq.wallet
affects: all
gotchaMethods return raw dicts, not objects; accessing nested fields requires key checks.
fix
Check for key existence: result.get('ok', False)
affects: all
Upgrade
Version history
0.1.43latest on PyPI · released Nov 30, 2025
Audit
Dependencies
requestsrequiredHTTP client for TON API calls
tonsdkrequiredCore TON data structures and serialization
Agent activity
31 hits · last 30 days
node
26
OpenAI (training)
1
Resources
pytoniq — pip install pytoniq · libregistry