Skip to main content

Python TON.sh Public API

Project description

PyPi Package Version Supported Python versions PyPi downloads

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.

  1. Create pyTONPublicAPI instance
  2. 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


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)

Uploaded Source

Supported by

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