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.60.tar.gz
(454.7 kB
view details)
Built Distribution
File details
Details for the file tronpytool-3.6.60.tar.gz
.
File metadata
- Download URL: tronpytool-3.6.60.tar.gz
- Upload date:
- Size: 454.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.26.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63583d8d0e11ddcada5b4e38c81ae6e61e38c2b9de1cd1ceb2ec9689fc2afa87 |
|
MD5 | 11f405bda7446036faaa8c7b6cb671f0 |
|
BLAKE2b-256 | f93ab7a96c83bb4edadbcdfaf272a32914da3f75a4982b259fbfbdb5acd04663 |
File details
Details for the file tronpytool-3.6.60-py3-none-any.whl
.
File metadata
- Download URL: tronpytool-3.6.60-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.26.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 962142ef6dc726f3064bc1c599465070c9efcbe1680a4522f00c816edd1a21a2 |
|
MD5 | efdc08adadde800f259c6f6bda4eecfa |
|
BLAKE2b-256 | 5f2ceb3be0ecb94ca0b0ff07a15796591423b32b03ff74da65f2dbefb3d4eaf3 |