A Python API for interacting with Tron networks
Project description
A Python API for interacting with the Tron (TRX)
A Command-Line Interface framework
You can install it in a system-wide location via pip:
sudo pip3 install tronpytool
Or install it locally using virtualenv:
virtualenv -p /usr/bin/python3 ~/tronpytool
source ~/tronpytool/bin/activate
pip3 install tronpytool
Usage
Specify the API endpoints:
Smart Contract
from tronpytool import HttpProvider
from tronpytool import Tron
full_node = HttpProvider('https://api.trongrid.io')
solidity_node = HttpProvider('https://api.trongrid.io')
event_server = HttpProvider('https://api.trongrid.io')
# option 1
tron = Tron(full_node=full_node,
solidity_node=solidity_node,
event_server=event_server)
# option 2
tron_v2 = Tron()
# option 3
tron_v3 = Tron(
default_address='TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY',
private_key='...'
)
# option 4
tron_v4 = Tron().setNetwork('nile')
Documentation
Read the library manual by the manual Documentation is available at docs.
Donations
TRON: TWnb6wdmr4v7nKjEyCZvvCk4WqMDYRDVPf
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tronpytool-3.6.61.tar.gz
(454.7 kB
view hashes)
Built Distribution
Close
Hashes for tronpytool-3.6.61-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0eaea246c0e32ca8cbdb3e039bd07541e30d0f94ad9ad4bba9f4c37f2c90166 |
|
MD5 | 1a9b8c4bd0a6551add96be736232b3b5 |
|
BLAKE2b-256 | 56c2f75d713b5f5a3b95f5621be658a6c31b29f76598de9538bafa2724d19c13 |