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.3.tar.gz
(4.7 kB
view details)
File details
Details for the file pyTONPublicAPI-0.0.3.tar.gz
.
File metadata
- Download URL: pyTONPublicAPI-0.0.3.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ba5469df06b6068b546dc7791b6f35437cdcd694178ad6481bb66196253d145 |
|
MD5 | 79da2da1679efa7e34a82dd04d9e4523 |
|
BLAKE2b-256 | 40508965febe1c3795f7f33dc1ebcde1d9c277642bdcd399ff7ed1824a576ed9 |