Introducing Pytoniq: A Python SDK for TON Blockchain 🚀

Pytoniq, a Python Software Development Kit (SDK) for the TON Blockchain (The Open Network), extends its core functionalities with native LiteClient and ADNL components, providing developers with a robust toolset for blockchain operations. For further details, contributors and users can join the Python - TON developers chat :loudspeaker:.

Key Features and Installation :hammer_and_wrench:

  • PyPI Version: PyPI version
  • Supported Python Versions: Python Version
  • Downloads: Downloads | Monthly Downloads
  • TON Integration: TON

To get started, simply run:

pip install pytoniq 

Comprehensive Documentation :books:

For an in-depth understanding and additional resources, visit the GitBook Documentation.

Installation & Usage Examples :memo:

From initializing the LiteClient to leveraging the LiteBalancer for optimized query handling, Pytoniq offers extensive functionalities. Check out the examples directory for practical applications.

LiteClient :globe_with_meridians:

The LiteClient enables direct interaction with the TON Blockchain, offering functionalities such as block transactions scanning and masterchain information retrieval.

Usage:
  1. Client Initialization:

    • Establish connection with the TON network specifying the configuration (mainnet, testnet, or custom).
    • Retrieve masterchain information and manage connection lifecycle.
  2. Blocks Transactions Scanning:

    • Implement BlockScanner to navigate through block transactions, filtering by workchain ID.

LiteBalancer :arrows_clockwise:

LiteBalancer ensures efficient management of LiteServer connections by monitoring peer availability and directing requests to the optimal server based on response times and block sequence numbers.

Special Features:
  • Retry mechanism on timeout errors.
  • Archival LiteServer detection for historical data requests.

Blockstore :card_file_box:

Pytoniq ensures data integrity through blockstore verification, allowing zero trust level operations with block data provenance.

Advanced Network Layer (ADNL) & Distributed Hash Table (DHT) :earth_africa:

ADNL provides a decentralized networking protocol for efficient peer-to-peer interactions, while DHT extends capabilities with distributed storage solutions.

Key Operations:
  • Start ADNL server and manage peer connections.
  • Utilize DHT for distributed storage and retrieval of network information.

Conclusion

Pytoniq stands as a comprehensive toolkit for Python developers working with the TON Blockchain, offering a range of functionalities from basic blockchain interactions to advanced networking protocols. With its easy installation, detailed documentation, and robust SDK, Pytoniq fosters a supportive environment for developers to build, innovate, and contribute to the TON ecosystem.

For a hands-on experience and to explore the full potential of Pytoniq, refer to the provided examples and join the vibrant developer community.