tronpy
TRON Python client library
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 tronpyuv
uv add tronpypoetry
poetry add tronpyInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
web3web3.py is a Python library for interacting…
permissive · top 5,000 on PyPI
anchorpyAnchorPy is a Python client library for…
unclear · top 15,000 on PyPI
cosmpyCosmPy provides Python bindings to interact…
permissive · top 15,000 on PyPI
eth-accounteth-account signs Ethereum transactions and…
permissive · top 5,000 on PyPI
injective-pyInjective Python SDK provides client libraries…
permissive · top 15,000 on PyPI
xrpl-pyA pure Python library for building applications…
permissive · top 15,000 on PyPI
clvmA LISP-like virtual machine for writing and…
permissive · top 15,000 on PyPI
fireblocks-sdkOfficial Python SDK for the Fireblocks API that…
permissive · top 15,000 on PyPI
aptos-sdkProvides Python bindings to interact with the…
permissive · top 15,000 on PyPI