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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14d1bb667232dba32b6bfd254da3ef47fc795210c194ba4648196a98b71ccde6
|
|
| MD5 |
82454d072a429826c6a015bbf072d01f
|
|
| BLAKE2b-256 |
ba65f7defd80646f7db7d7428cf9f9ff238baf5361d6a8a95b2592b515bda67c
|
Provenance
The following attestation bundles were made for pyfragment-2026.3.4.tar.gz:
Publisher:
publish.yml on bohd4nx/pyfragment
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfragment-2026.3.4.tar.gz -
Subject digest:
14d1bb667232dba32b6bfd254da3ef47fc795210c194ba4648196a98b71ccde6 - Sigstore transparency entry: 2468804080
- Sigstore integration time:
-
Permalink:
bohd4nx/pyfragment@ab2bf0bfe3fc333b35c2a9e960b1002724a07397 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/bohd4nx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab2bf0bfe3fc333b35c2a9e960b1002724a07397 -
Trigger Event:
workflow_run
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06c3f41d584826bf4f2d7baf990720646cbb0b902e833522d6c29f0facb57386
|
|
| MD5 |
083c63e9182c5fa18911c18ef0f349fc
|
|
| BLAKE2b-256 |
c1a27ebc3132d0cf82c502deede8229598522c26dde8ddcd37d4433d45f236b1
|
Provenance
The following attestation bundles were made for pyfragment-2026.3.4-py3-none-any.whl:
Publisher:
publish.yml on bohd4nx/pyfragment
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyfragment-2026.3.4-py3-none-any.whl -
Subject digest:
06c3f41d584826bf4f2d7baf990720646cbb0b902e833522d6c29f0facb57386 - Sigstore transparency entry: 2468804094
- Sigstore integration time:
-
Permalink:
bohd4nx/pyfragment@ab2bf0bfe3fc333b35c2a9e960b1002724a07397 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/bohd4nx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ab2bf0bfe3fc333b35c2a9e960b1002724a07397 -
Trigger Event:
workflow_run
-
Statement type: