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.4.tar.gz (53.1 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.4-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyfragment-2026.3.4.tar.gz
  • Upload date:
  • Size: 53.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyfragment-2026.3.4.tar.gz
Algorithm Hash digest
SHA256 14d1bb667232dba32b6bfd254da3ef47fc795210c194ba4648196a98b71ccde6
MD5 82454d072a429826c6a015bbf072d01f
BLAKE2b-256 ba65f7defd80646f7db7d7428cf9f9ff238baf5361d6a8a95b2592b515bda67c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfragment-2026.3.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: pyfragment-2026.3.4-py3-none-any.whl
  • Upload date:
  • Size: 42.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pyfragment-2026.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 06c3f41d584826bf4f2d7baf990720646cbb0b902e833522d6c29f0facb57386
MD5 083c63e9182c5fa18911c18ef0f349fc
BLAKE2b-256 c1a27ebc3132d0cf82c502deede8229598522c26dde8ddcd37d4433d45f236b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyfragment-2026.3.4-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

This release

2026.3.4 This release

2 files

2026.3.3

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