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.74.tar.gz
(416.8 kB
view details)
Built Distribution
File details
Details for the file tronpytool-3.6.74.tar.gz
.
File metadata
- Download URL: tronpytool-3.6.74.tar.gz
- Upload date:
- Size: 416.8 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 | cd64b81b850fb298027d6301b7ec67140e9fa3e7de8643d509c21cdf552fff55 |
|
MD5 | 703dec42e24d79b4398bed35270a64ec |
|
BLAKE2b-256 | 0a19d3f38c87d812e2a84e7d2cc28dca11366a27e640372f13303cc0b7beffcf |
File details
Details for the file tronpytool-3.6.74-py3-none-any.whl
.
File metadata
- Download URL: tronpytool-3.6.74-py3-none-any.whl
- Upload date:
- Size: 94.6 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 | 8edf8ad0b080b625966eca713e16f1824399d7bb36de0af730e05dc95e6ef634 |
|
MD5 | c9ce074ea2a17a09d89a7dfe05f8a06a |
|
BLAKE2b-256 | c8683de7d83137793f9bc0d09417bb26f13edef178e810e736af04ea9b1b1598 |