python-fragment

Reverse engineered Fragment API that mimics the official webclient


Keywords
async, asyncio, fragment, ton, telegram, api, python
License
MIT
Install
pip install python-fragment==0.3.0

Documentation

python-fragment

GitHub license PyPi package version Supported python versions

Features

  • Fast and asynchronous
  • Fully typed
  • Easy to contribute and use

Installation

pip install -U python-fragment

Or using poetry:

poetry add python-fragment

Quick Start

from fragment import FragmentAPI

import asyncio


async def main():
    api = FragmentAPI()
    async with api:
        # Get username auctions
        usernames = await api.usernames.search()
        for username in usernames[:5]:
            print(username)
            # {
            #     'username': 'lynx',
            #     'status': 'auction',
            #     'value': 6619.0,
            #     'datetime': '2023-10-31T06:11:25+00:00',
            #     'is_resale': False
            # }


asyncio.run(main())