tronpy
======
TRON Python Client Library.
---------------------------
How to use
~~~~~~~~~~
.. code-block:: python
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")
.fee_limit(100_000_000)
.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}}
Raw data
{
"_id": null,
"home_page": "https://github.com/nobbennob/nobi-tronpy",
"name": "nobi-tronpy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "andelf",
"author_email": "andelf@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a3/4e/28d9dd1ad1b06dd9de4946d09c8b310d69a6bf08d5ec13cc2a3d817bbdaf/nobi-tronpy-0.2.7.tar.gz",
"platform": null,
"description": "tronpy\n======\n\nTRON Python Client Library.\n---------------------------\n\nHow to use\n~~~~~~~~~~\n\n.. code-block:: python\n\n from tronpy import Tron\n\n client = Tron(network='nile')\n # Private key of TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3\n priv_key = PrivateKey(bytes.fromhex(\"8888888888888888888888888888888888888888888888888888888888888888\"))\n\n txn = (\n client.trx.transfer(\"TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3\", \"TVjsyZ7fYF3qLF6BQgPmTEZy1xrNNyVAAA\", 1_000)\n .memo(\"test memo\")\n .fee_limit(100_000_000)\n .build()\n .inspect()\n .sign(priv_key)\n .broadcast()\n )\n\n print(txn)\n # > {'result': True, 'txid': '5182b96bc0d74f416d6ba8e22380e5920d8627f8fb5ef5a6a11d4df030459132'}\n print(txn.wait())\n # > {'id': '5182b96bc0d74f416d6ba8e22380e5920d8627f8fb5ef5a6a11d4df030459132', 'blockNumber': 6415370, 'blockTimeStamp': 1591951155000, 'contractResult': [''], 'receipt': {'net_usage': 283}}\n",
"bugtrack_url": null,
"license": "",
"summary": "TRON Python client library",
"version": "0.2.7",
"project_urls": {
"Homepage": "https://github.com/nobbennob/nobi-tronpy"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "340df72a7e0f0df2936016560615a64c7303a0b1f920822478444d8c35a3a869",
"md5": "1ce8fc50bc0e6a49cbe4138d97745f01",
"sha256": "4c92950be0be8b10f5ae6c807f83ef9f810ff374d168c5d7e1da3cd44ee6ad35"
},
"downloads": -1,
"filename": "nobi_tronpy-0.2.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1ce8fc50bc0e6a49cbe4138d97745f01",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6,<4.0",
"size": 34817,
"upload_time": "2023-08-19T12:15:25",
"upload_time_iso_8601": "2023-08-19T12:15:25.047601Z",
"url": "https://files.pythonhosted.org/packages/34/0d/f72a7e0f0df2936016560615a64c7303a0b1f920822478444d8c35a3a869/nobi_tronpy-0.2.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a34e28d9dd1ad1b06dd9de4946d09c8b310d69a6bf08d5ec13cc2a3d817bbdaf",
"md5": "ab8623a7c9238dc3bd2cafa230253af9",
"sha256": "664e79e3e285f717cb1d5e56a2dafe4cc396414c3ae88345165051bb6cdb6b87"
},
"downloads": -1,
"filename": "nobi-tronpy-0.2.7.tar.gz",
"has_sig": false,
"md5_digest": "ab8623a7c9238dc3bd2cafa230253af9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6,<4.0",
"size": 35959,
"upload_time": "2023-08-19T12:15:26",
"upload_time_iso_8601": "2023-08-19T12:15:26.520104Z",
"url": "https://files.pythonhosted.org/packages/a3/4e/28d9dd1ad1b06dd9de4946d09c8b310d69a6bf08d5ec13cc2a3d817bbdaf/nobi-tronpy-0.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-19 12:15:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nobbennob",
"github_project": "nobi-tronpy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "nobi-tronpy"
}