Skip to main content

A Python API for interacting with Tron (TRX)

Project description

A Python API for interacting with the Tron (TRX)

https://img.shields.io/pypi/v/tronpytool.svg https://img.shields.io/pypi/pyversions/tronpytool.svg https://api.travis-ci.com/iexbase/tron-api-python.svg?branch=master https://img.shields.io/github/issues/iexbase/tron-api-python.svg https://img.shields.io/github/issues-pr/iexbase/tron-api-python.svg Codacy Badge

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: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY

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.5.54.tar.gz (63.9 kB view details)

Uploaded Source

Built Distribution

tronpytool-3.5.54-py3-none-any.whl (75.7 kB view details)

Uploaded Python 3

File details

Details for the file tronpytool-3.5.54.tar.gz.

File metadata

  • Download URL: tronpytool-3.5.54.tar.gz
  • Upload date:
  • Size: 63.9 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

Hashes for tronpytool-3.5.54.tar.gz
Algorithm Hash digest
SHA256 9cb4b82ca7245e6b676b97e3990c6492d33168f601c60edd3dba12f2cc2339dc
MD5 f2d2017db9da088c5d101ef34fe84f65
BLAKE2b-256 ed7bd079da304b482350bc336b02789420a8905a96c2a7d2d4620b45f8ae91b0

See more details on using hashes here.

File details

Details for the file tronpytool-3.5.54-py3-none-any.whl.

File metadata

  • Download URL: tronpytool-3.5.54-py3-none-any.whl
  • Upload date:
  • Size: 75.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

Hashes for tronpytool-3.5.54-py3-none-any.whl
Algorithm Hash digest
SHA256 e4ea8ac1c50e036345cdc9a33f141c1fedbd5e17c92e5abc61ae76029f125a9b
MD5 157bb7217bb16036dd625e8fae7328c3
BLAKE2b-256 ef39ef229158eff6b456ca4b3eadc3c9bd06dd849b2bc2b03826ce328e695f70

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page