Python TON.sh Public API
Project description
pyTONPublicAPI
Python implementation of TON Public API (https://ton.sh/api) for The Open Network (TON).
Installation
Installation using pip (a Python package manager)*:
$ pip install pyTONPublicAPI
Usage
Everything is as simple as the API itself.
- Create pyTONPublicAPI instance
- Access API methods in pythonic notation (getAddressInformation -> get_address_information)
from api import pyTONPublicAPI
client = pyTONPublicAPI()
print(client.get_address_balance(address = "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N"))
If you want to work with a single address - you can pre-set it on init and avoid in functions.
from api import pyTONPublicAPI
client = pyTONPublicAPI(address = "EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N")
print(client.get_address_balance())
print(client.get_transactions())
You can also check tests.py.
Exceptions
Exceptions are rised using pyTONException class.
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
pyTONPublicAPI-0.0.2.tar.gz
(4.6 kB
view hashes)