{"id":44686332,"url":"https://github.com/iexbase/tron-api-python","last_synced_at":"2026-02-15T06:06:55.854Z","repository":{"id":37601790,"uuid":"148920240","full_name":"iexbase/tron-api-python","owner":"iexbase","description":"A Python API for interacting with Tron (TRX)","archived":false,"fork":false,"pushed_at":"2023-07-17T21:04:55.000Z","size":395,"stargazers_count":168,"open_issues_count":46,"forks_count":82,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-09-16T03:45:50.152Z","etag":null,"topics":["iexbase","tron","tron-api","tron-api-python","tron-library","tron-protocol","tron-rest"],"latest_commit_sha":null,"homepage":"https://tronapi-for-python.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iexbase.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-15T16:39:33.000Z","updated_at":"2025-08-14T16:04:39.000Z","dependencies_parsed_at":"2024-06-18T18:38:55.195Z","dependency_job_id":"b28fad71-b2a5-4efe-bae9-00ff4cf64631","html_url":"https://github.com/iexbase/tron-api-python","commit_stats":{"total_commits":392,"total_committers":10,"mean_commits":39.2,"dds":"0.030612244897959218","last_synced_commit":"2da3b705d0bb139ef556d93cf14f3f1a5f938e87"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/iexbase/tron-api-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iexbase%2Ftron-api-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iexbase%2Ftron-api-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iexbase%2Ftron-api-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iexbase%2Ftron-api-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iexbase","download_url":"https://codeload.github.com/iexbase/tron-api-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iexbase%2Ftron-api-python/sbom","scorecard":{"id":481970,"data":{"date":"2025-08-11","repo":{"name":"github.com/iexbase/tron-api-python","commit":"2da3b705d0bb139ef556d93cf14f3f1a5f938e87"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":3,"reason":"Found 7/23 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T16:52:26.725Z","repository_id":37601790,"created_at":"2025-08-19T16:52:26.725Z","updated_at":"2025-08-19T16:52:26.725Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29471190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T05:26:30.465Z","status":"ssl_error","status_checked_at":"2026-02-15T05:26:21.858Z","response_time":118,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iexbase","tron","tron-api","tron-api-python","tron-library","tron-protocol","tron-rest"],"created_at":"2026-02-15T06:06:53.914Z","updated_at":"2026-02-15T06:06:55.848Z","avatar_url":"https://github.com/iexbase.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===================\nTRON API for Python\n===================\n\nA Python API for interacting with the Tron (TRX)\n\n.. image:: https://img.shields.io/pypi/v/tronapi.svg\n    :target: https://pypi.python.org/pypi/tronapi\n\n.. image:: https://img.shields.io/pypi/pyversions/tronapi.svg\n    :target: https://pypi.python.org/pypi/tronapi\n\n.. image:: https://api.travis-ci.com/iexbase/tron-api-python.svg?branch=master\n    :target: https://travis-ci.com/iexbase/tron-api-python\n    \n.. image:: https://img.shields.io/github/issues/iexbase/tron-api-python.svg\n    :target: https://github.com/iexbase/tron-api-python/issues\n    \n.. image:: https://img.shields.io/github/issues-pr/iexbase/tron-api-python.svg\n    :target: https://github.com/iexbase/tron-api-python/pulls\n\n.. image:: https://api.codacy.com/project/badge/Grade/8a5ae1e1cc834869b1094ea3b0d24f78\n   :alt: Codacy Badge\n   :target: https://app.codacy.com/app/serderovsh/tron-api-python?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=iexbase/tron-api-python\u0026utm_campaign=Badge_Grade_Dashboard\n    \n\n------------\n\n**A Command-Line Interface framework**\n\nYou can install it in a system-wide location via pip:\n\n.. code-block:: bash\n\n    sudo pip3 install tronapi\n\nOr install it locally using `virtualenv \u003chttps://github.com/pypa/virtualenv\u003e`__:\n\n.. code-block:: bash\n\n    virtualenv -p /usr/bin/python3 ~/tronapi\n    source ~/tronapi/bin/activate\n    pip3 install tronapi\n\n------------\n\nUsage\n=====\nSpecify the API endpoints:\n\n\nSmart Contract\n--------------\n\n.. code-block:: python\n\n    from tronapi import Tron\n    from solc import compile_source\n\n    full_node = 'https://api.trongrid.io'\n    solidity_node = 'https://api.trongrid.io'\n    event_server = 'https://api.trongrid.io'\n\n    tron = Tron(full_node=full_node,\n            solidity_node=solidity_node,\n            event_server=event_server)\n\n    # or default (tron = Tron())\n\n\n    # Solidity source code\n    contract_source_code = '''\n    pragma solidity ^0.4.25;\n\n    contract Hello {\n        string public message;\n\n        function Hello(string initialMessage) public {\n            message = initialMessage;\n        }\n\n        function setMessage(string newMessage) public {\n            message = newMessage;\n        }\n    }\n\n    '''\n\n    compiled_sol = compile_source(contract_source_code)\n    contract_interface = compiled_sol['\u003cstdin\u003e:Hello']\n\n    hello = tron.trx.contract(\n        abi=contract_interface['abi'],\n        bytecode=contract_interface['bin']\n    )\n\n    # Submit the transaction that deploys the contract\n    tx = hello.deploy(\n        fee_limit=10**9,\n        call_value=0,\n        consume_user_resource_percent=1\n    )\n\n..\n\nBase Example\n------------\n\n.. code-block:: python\n    \n    from tronapi import Tron\n    logging.basicConfig(level=logging.DEBUG, format=\"%(asctime)s - %(levelname)s - %(message)s\")\n    logger = logging.getLogger()\n\n    full_node = 'https://api.trongrid.io'\n    solidity_node = 'https://api.trongrid.io'\n    event_server = 'https://api.trongrid.io'\n\n    tron = Tron(full_node=full_node,\n            solidity_node=solidity_node,\n            event_server=event_server)\n\n    account = tron.create_account\n    is_valid = bool(tron.trx.is_address(account.address.hex))\n\n    logger.debug('Generated account: ')\n    logger.debug('- Private Key: ' + account.private_key)\n    logger.debug('- Public Key: ' + account.public_key)\n    logger.debug('- Address: ')\n    logger.debug('-- Base58: ' + account.address.base58)\n    logger.debug('-- Hex: ' + account.address.hex)\n    logger.debug('-- isValid: ' + str(is_valid))\n    logger.debug('-----------')\n    \n    transaction = tron.trx.get_transaction('757a14cef293c69b1cf9b9d3d19c2e40a330c640b05c6ffa4d54609a9628758c')\n\n    logger.debug('Transaction: ')\n    logger.debug('- Hash: ' + transaction['txID'])\n    logger.debug('- Transaction: ' + json.dumps(transaction, indent=2))\n    logger.debug('-----------')\n    \n    # Events\n    event_result = tron.trx.get_event_result('TGEJj8eus46QMHPgWQe1FJ2ymBXRm96fn1', 0, 'Notify')\n\n    logger.debug('Event result:')\n    logger.debug('Contract Address: TGEJj8eus46QMHPgWQe1FJ2ymBXRm96fn1')\n    logger.debug('Event Name: Notify')\n    logger.debug('Block Number: 32162')\n    logger.debug('- Events: ' + json.dumps(event_result, indent=2))\n\nMore samples and snippets are available at `examples \u003chttps://github.com/iexbase/tron-api-python/tree/master/examples\u003e`__.\n\nDocumentation\n=============\n\nDocumentation is available at `docs \u003chttps://tronapi-for-python.readthedocs.io/en/latest/\u003e`__.\n\n\nDonations\n=============\n\nTRON: TRWBqiqoFZysoAeyR1J35ibuyc8EvhUAoY\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiexbase%2Ftron-api-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiexbase%2Ftron-api-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiexbase%2Ftron-api-python/lists"}