Skip to main content
pyfragment

pyfragment

PyPI Downloads Python Tests License

Async Python client for the Fragment.com marketplace API.

Documentation · Examples

Disclaimer: This project is not affiliated with Fragment or Telegram.

Installation

pip install pyfragment
# Latest dev build
pip install git+https://github.com/bohd4nx/pyfragment.git@dev

Quick Start

import asyncio

from pyfragment import FragmentClient
from pyfragment.enums import PaymentMethod


async def main() -> None:
    async with FragmentClient(
        seed="word1 word2 ... word24",
        api_key="YOUR_API_KEY",
        cookies={"stel_ssid": "...", "stel_dt": "...", "stel_token": "...", "stel_ton_token": "..."},
    ) as client:
        wallet = await client.get_wallet()
        print("GRAM: %s | USDT: %s" % (wallet.gram_balance, wallet.usdt_balance))

        stars = await client.purchase_stars("@username", amount=500, payment_method=PaymentMethod.USDT_GRAM)
        print("Sent %s Stars to %s | tx: %s" % (stars.amount, stars.username, stars.transaction_id))

        premium = await client.purchase_premium("@username", months=6, payment_method=PaymentMethod.GRAM)
        print("Sent Premium %sm to %s | tx: %s" % (premium.amount, premium.username, premium.transaction_id))


asyncio.run(main())

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfragment-2026.3.3.tar.gz (46.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfragment-2026.3.3-py3-none-any.whl (40.1 kB view details)

Uploaded Python 3

File details

Details for the file pyfragment-2026.3.3.tar.gz.

File metadata

  • Download URL: pyfragment-2026.3.3.tar.gz
  • Upload date:
  • Size: 46.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyfragment-2026.3.3.tar.gz
Algorithm Hash digest
SHA256 3fba0c7894e8aea558d5a6ad7b98a3c8b23e7a15fe76646e9724b71e63c1acbe
MD5 3c6a7e2de58ee4a469745bcf74daea7c
BLAKE2b-256 ed6374beb7f49dcc5e10114010aa514c3ea01965202ea69b6bf1c92d12cf2a4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfragment-2026.3.3.tar.gz:

Publisher: publish.yml on bohd4nx/pyfragment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyfragment-2026.3.3-py3-none-any.whl.

File metadata

  • Download URL: pyfragment-2026.3.3-py3-none-any.whl
  • Upload date:
  • Size: 40.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyfragment-2026.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1534ccf3ffbfc6ac219ba35c4a9087c7befc3d95a7f1ec80e2703ee3be1b3212
MD5 adf1708ace8dc6b687737e8d52998ea9
BLAKE2b-256 c93b754bcae1f579f61943fff325307a9af54d465020ff1b5ddd3bc5efa7437c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfragment-2026.3.3-py3-none-any.whl:

Publisher: publish.yml on bohd4nx/pyfragment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2026.3.4

2 files

This release

2026.3.3 This release

2 files

2026.3.2

2 files

2026.3.1

2 files

2026.3.0

2 files

2026.2.3

2 files

2026.2.2

2 files

2026.2.1

2 files

2026.2.0

2 files

2026.1.0

2 files

2026.0.2

2 files

2026.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page