Skip to main content

TRON Python client library

Project description

tronpy

PyPI version

TRON Python Client Library. Documentation

How to use

from tronpy import Tron

client = Tron(network='nile')
# Private key of TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3
priv_key = PrivateKey(bytes.fromhex("8888888888888888888888888888888888888888888888888888888888888888"))

txn = (
    client.trx.transfer("TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3", "TVjsyZ7fYF3qLF6BQgPmTEZy1xrNNyVAAA", 1_000)
    .memo("test memo")
    .build()
    .inspect()
    .sign(priv_key)
    .broadcast()
)

print(txn)
# > {'result': True, 'txid': '5182b96bc0d74f416d6ba8e22380e5920d8627f8fb5ef5a6a11d4df030459132'}
print(txn.wait())
# > {'id': '5182b96bc0d74f416d6ba8e22380e5920d8627f8fb5ef5a6a11d4df030459132', 'blockNumber': 6415370, 'blockTimeStamp': 1591951155000, 'contractResult': [''], 'receipt': {'net_usage': 283}}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tronpy-0.1.2.tar.gz (18.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tronpy-0.1.2-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file tronpy-0.1.2.tar.gz.

File metadata

  • Download URL: tronpy-0.1.2.tar.gz
  • Upload date:
  • Size: 18.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Darwin/18.7.0

File hashes

Hashes for tronpy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 15ad2fcbbc88980fcf4054560a0a8764b398dcc188195ee35a78a813b8cde52a
MD5 03dc7259e36e8087ed00af07964eb057
BLAKE2b-256 42ac405f53da6e97bfcb7cde4baaf33e64b594223a03a5ddce183c961c0bd109

See more details on using hashes here.

File details

Details for the file tronpy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tronpy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Darwin/18.7.0

File hashes

Hashes for tronpy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5976e7d6d6fe197432ce4ec2570c72513b0178370d609c7cd7a86bc57d519337
MD5 134140785d5f97ded918382900785b54
BLAKE2b-256 d9be7597db00aa2f7be74292f1a0a88a8e286602753d4b025b07ff0f6b33dfe1

See more details on using hashes here.

Supported by

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