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.57.tar.gz
(454.2 kB
view details)
Built Distribution
File details
Details for the file tronpytool-3.6.57.tar.gz
.
File metadata
- Download URL: tronpytool-3.6.57.tar.gz
- Upload date:
- Size: 454.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a8c309fbb8d8521226cacbc68c84800810bcea456fc528d660a54989b9cb368 |
|
MD5 | 5ba705ea3db3aaea0207480b16d1b748 |
|
BLAKE2b-256 | 9d34627c258a472dfef34cbb10db36d9790ca8d627dadcb563b760aaa2b3a1a9 |
File details
Details for the file tronpytool-3.6.57-py3-none-any.whl
.
File metadata
- Download URL: tronpytool-3.6.57-py3-none-any.whl
- Upload date:
- Size: 88.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2df4a64803de1f15ca5e10195eee6a3075897d26d65fa9b38477118978665409 |
|
MD5 | 4a9435e824d1979f9971bbdb91ff8c57 |
|
BLAKE2b-256 | 7f8b60a697745c260fe7fea778d148b281d0827a1204f88f9c819b9814aa4add |