Skip to main content

A powerful, offline-first Python library for fetching Telegram Gifts metadata, models, prices, and custom emojis.

Project description

TelegramGifts

Python SDK for Telegram Gifts API: Fetch real-time market prices (TGMrkt, GetGems, Fragment), upgraded NFT models, regular gifts, custom emoji IDs, and download WebP/TGS assets offline without a Telegram bot token.

PyPI version GitHub stars License Python version

Why this library?

  • No API Key Needed: Fetch comprehensive gift data without authenticating to the Telegram API.
  • Continuously Auto-Updated: Data is served directly from a GitHub-hosted, automatically synchronized dataset.
  • Smart Local Caching: Powered by ETag-based caching to ensure lightning-fast responses and zero rate limits.
  • Unified & Simple API: Look up models, prices, custom emojis, and backdrops with a single, intuitive interface.

Installation

pip install TelegramGifts

Quick Start

from TelegramGifts import TelegramGifts

# Initialize the library (auto-creates a smart cache)
gifts = TelegramGifts()

# Fetch comprehensive information about a gift by its ID or Name
info = gifts.get_gift("Artisan Brick")

print(f"Name: {info['full_name']}")
print(f"Custom Emoji ID: {info['custom_emoji_id']}")
print(f"Market Price: {info['prices']['tgmrkt_price_ton']} TON")

Features

Feature Description
Upgraded & Regular Gifts Complete data for both upgraded NFT-like models and regular Telegram gifts.
Market Prices Instant access to floor prices across Fragment, GetGems, and TGMrkt.
Custom Emojis & Backdrops Retrieve hidden custom emoji IDs and rarity metrics for specific models.
Asset Downloading Download high-quality WebP and TGS sticker animations locally with ease.

Usage Examples

1. Retrieve Upgraded Models and Prices

Easily extract model specific data such as prices, attributes, and custom emojis.

from TelegramGifts import TelegramGifts

gifts = TelegramGifts()

# Fetch details for the 'Pro Gamer' model of the Artisan Brick gift
model = gifts.get_model_details("artisan_brick", "Pro Gamer")

if model:
    print(f"Model: {model['name']}")
    print(f"Price: {model['price_ton']} TON")
    print(f"Emoji ID: {model['custom_emoji_id']}")
    print(f"WebP Asset: {model['links']['webp']}")

2. Download Gift Assets Locally

Automate the downloading of gift animations for bots or localized rendering.

# Downloads the TGS file for a specific gift into your cache folder
local_tgs_path = gifts.download_image("artisan_brick", ext="tgs")
print(f"Saved asset to: {local_tgs_path}")

3. Retrieve All Gifts and Floor Prices

Iterate over the entire catalog of available gifts seamlessly.

# Fetch all regular gifts
regular_gifts = gifts.get_regular_gifts()
for gift in regular_gifts[:5]:
    print(f"{gift.full_name} | Supply: {gift.supply} | Floor: {gift.floor_price}")

Open Source Ecosystem

This project is split into two specialized repositories to keep the library lightweight and fast:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request to the repository. Before submitting, ensure that your code aligns with the existing architecture and passes all basic type checks.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author & Contact

🔍 Search Terms & Discoverability This section helps developers find this repository via search engines:
telegram gift prices API library no token no bot 2025, telegram gifts floor price API public no authentication 2025, fragment.com telegram gifts API public endpoint no auth site:github.com, tonnel marketplace API telegram gifts price no login python library github, telegram gifts sdk, telegram nft gifts price, telegram star gifts, tgmrkt getgems fragment prices python, telegram gifts price api, telegram unique gifts python, telegram gift emoji backdrop, telegram gifts library no api key, telegram gift models fetching.

Project details


Download files

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

Source Distribution

telegramgifts-1.0.0.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

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

telegramgifts-1.0.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file telegramgifts-1.0.0.tar.gz.

File metadata

  • Download URL: telegramgifts-1.0.0.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for telegramgifts-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b904a01b222b894157fa0c6ea2eae549af74f957abd58cc857c98c7252ad625b
MD5 0f43b8c535fbc70619d8c535ea289027
BLAKE2b-256 384e0582ad9ddff4da20aea4ceab7ca3df37916de1f43c6cc9b59f4f145dc91d

See more details on using hashes here.

File details

Details for the file telegramgifts-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: telegramgifts-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for telegramgifts-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1a0f574d2c2d4f407507b6e80fa38d8df857b0c65590571306f9d6fdc835db4
MD5 1b593ff602e0b8d4f61903b93a0452f9
BLAKE2b-256 c15243a87883f3bdf9d149e243c84012e1cae341568e5d32dcd18f5a53d3ffc3

See more details on using hashes here.

Supported by

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