skillfed

tronpy

TRON Python client library

tronpy v0.6.2 204.4K downloads/30d#9,608 on PyPI244
Permissive license MIT AGING released

What it is and what it does

tronpy is a Python client library that abstracts the TRON blockchain's JSON-RPC API, allowing developers to construct, sign, and broadcast transactions without manually crafting HTTP requests. It wraps cryptographic operations using coincurve and pycryptodome, and provides both synchronous and asynchronous interfaces via httpx and requests for network communication. The library handles transaction building through a fluent API—you chain methods like `.transfer()`, `.memo()`, `.build()`, `.sign()`, and `.broadcast()` to construct and execute blockchain operations.

The package is designed for developers integrating TRON into Python applications: wallet software, trading bots, smart contract interaction tools, or blockchain explorers. It manages private key handling, transaction serialization, and network communication, reducing boilerplate. Both sync and async modes are supported, making it suitable for single-threaded scripts or concurrent applications. The library targets Python 3.9 and later and is in Beta development status.

Use it for:

  • Build and broadcast TRX transfers or token transactions on the TRON mainnet or testnet without writing raw JSON-RPC calls.
  • Implement a TRON wallet or key management tool that signs transactions locally before broadcasting to the network.
  • Create trading bots or arbitrage scripts that need to execute TRON transactions asynchronously at scale.
  • Interact with TRON smart contracts by constructing and sending contract invocation transactions with custom parameters.
  • Query account balances, transaction history, and blockchain state from a Python application using the client's read methods.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

tronpy is a Python client library for interacting with the TRON blockchain, enabling you to build and broadcast transactions, query account data, and manage cryptographic keys on the TRON network.

Yes, if you are building a TRON application in Python and need a mature, permissively licensed client library. The low install friction, broad Python version support, and zero known vulnerabilities make it a solid choice. However, note that maintenance is aging (218 days since last release)—verify that the library's TRON protocol support aligns with your network requirements before committing to production use.

Install

tronpy on PyPI

pip

pip install tronpy

uv

uv add tronpy

poetry

poetry add tronpy

Installing tronpy

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance status is aging—last release was 218 days ago and the repository shows activity as of 2026-01-08, but no recent updates. The package supports current Python versions (3.9 through 3.14) and carries 244 GitHub stars.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute tronpy freely as long as you include the license notice.

Quickstart

from tronpy import Tron
from tronpy.keys import PrivateKey

client = Tron(network='nile')
priv_key = PrivateKey(bytes.fromhex("8888888888888888888888888888888888888888888888888888888888888888"))
txn = client.trx.transfer("TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3", "TVjsyZ7fYF3qLF6BQgPmTEZy1xrNNyVAAA", 1_000).build().sign(priv_key).broadcast()

Requires Python 3.9 or later; you must have a valid TRON network endpoint configured or use a built-in network like 'nile'.

Verify before relying

  • Whether the aging maintenance status (218 days since last release) affects stability or security for production use.
  • Support level for TRON network protocol updates and compatibility with recent TRON chain changes.
  • Performance characteristics when handling high-volume transaction broadcasting or querying.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 6 — base58, coincurve, eth-abi, httpx, pycryptodome, requests
Maintenance aging — 218 days since the last release
Last repo commit
First released
Downloads 204,382/month — #9,608 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tronpy-0.6.2-py3-none-any.whl

Keywords: api, blockchain, tron

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: System AdministratorsNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

tron blockchain python clienttron transaction librarytron network api wrappertron smart contract interactiontron cryptocurrency transactionstron wallet managementtron blockchain sdk
blockchaincryptocurrencytron

More Python Modules packages