Fragment API — Python SDK
Buy Telegram Stars and Premium through Fragment API with local signing: the service prepares each payment, this SDK verifies it against a pinned checklist and signs it on your machine. Your wallet seed never leaves your server.
Install
pip install fragment-api-sdk
Requires Python 3.10+ and Node 18+ (used by the bundled TON signing helper).
Usage
from fragment_api_sdk import FragmentAPI
api = FragmentAPI(
api_key="mfrag_…", # issued by the service admin
cookies={"stel_ssid": "…", "stel_dt": "…", "stel_token": "…"}, # your Fragment session
seed="word1 word2 … word24", # used ONLY locally — never transmitted
max_ton_per_order=5_000_000_000, # mandatory spend limit (nanotons)
)
order = api.buy_stars("@durov", 100) # verify → sign locally → submit
print(order["status"]) # success
order = api.buy_premium("@durov", 12) # 3 | 6 | 12 months
Spend limits are mandatory — the SDK refuses to operate without them, and refuses to sign any payment that fails verification (order mismatch, unpinned destination, fee above cap, expired payment).
Full documentation: https://fragment.mboxcommunity.org/docs.html
Metadata
Release files for fragment-api-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fragment_api_sdk-0.1.0.tar.gz | 7.5 kB | Without provenance | Details for fragment_api_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fragment_api_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fragment_api_sdk-0.1.0-py3-none-any.whl |
Total release size: 15.9 kB
Release files / fragment_api_sdk-0.1.0.tar.gz
| Download URL | fragment_api_sdk-0.1.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13e63b8d97557c07ae817f035fbc2db2195a6974660774b4e0f2d73abeaf1603
|
|
BLAKE2b-256 checksum How to use checksums |
c28ff30c8c49edbe49b838339c377acb68c12d2875072a4bfae303871c5f2c04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / fragment_api_sdk-0.1.0-py3-none-any.whl
| Download URL | fragment_api_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23712d307b14b18dbb73b0448d8d2990d516d8ea9746e9124315d82f4fe29ce4
|
|
BLAKE2b-256 checksum How to use checksums |
621ce5e6ec26c1b53fa6cdc13c1e00a5cb1e06b974c6655437749121239f631e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for fragment-api-sdk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.