📦 Telegram Sticker Utils SDK
If you are not a developer, you can use the Telegram Sticker CLI (developed by this SDK) for user-friendly operations.
This SDK provides a set of utilities for working with Telegram stickers.
- Convert image formats without losing transparency.
- Auto optimize output size for sticker, make it valid for Telegram.
- Auto-detect sticker type and emojis.
🛠 Supported Pack Types
- Video Sticker
- Static Sticker
- Animated Sticker(Tgs)
🚀 Installation
You need install ImageMagick and ffmpeg before using this SDK.
Install Guide: https://docs.wand-py.org/en/0.6.12/guide/install.html
apt install ffmpeg
pip3 install telegram-sticker-utils
📖 Usage
import emoji
from telegram_sticker_utils import ImageProcessor
from telegram_sticker_utils import is_animated_gif
from telegram_sticker_utils.core.const import add_emoji_rule
try:
add_emoji_rule("sad", "😢")
add_emoji_rule("happy", emoji.emojize(":smile:"))
except ValueError as e:
print("NOT emoji")
print(is_animated_gif('test.gif')) # Path to the image file or a file-like object.
for sticker_file in ["happy.webp", "sad.png", "高兴.jpg", "悲伤.gif"]:
sticker = ImageProcessor.make_sticker(
input_name=sticker_file,
input_data=open(sticker_file, 'rb').read(),
scale=512
)
print(sticker.sticker_type)
print(sticker.emojis)
with open(f"{sticker_file}.{sticker.file_extension}", 'wb') as f:
f.write(sticker.data)
Metadata
Release files for telegram-sticker-utils 0.2.25
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 |
|---|---|---|---|---|
| telegram_sticker_utils-0.2.25.tar.gz | 23.4 kB | Without provenance | Details for telegram_sticker_utils-0.2.25.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| telegram_sticker_utils-0.2.25-py3-none-any.whl | Python 3 | none | any | Details for telegram_sticker_utils-0.2.25-py3-none-any.whl |
Total release size: 47.5 kB
Release files / telegram_sticker_utils-0.2.25.tar.gz
| Download URL | telegram_sticker_utils-0.2.25.tar.gz |
|---|---|
| Size | 23.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
600afb6ec9d41ce2a91ac90e8eb896422c56ea5d2ad689143871bb3018bb6ddc
|
|
BLAKE2b-256 checksum How to use checksums |
8e4e3fd3d96bc0d0483158a2d1911d7dfcb9ce144b7a22009712b16f59529c4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.0 CPython/3.12.3 Linux/6.17.0-1022-azure
|
Release files / telegram_sticker_utils-0.2.25-py3-none-any.whl
| Download URL | telegram_sticker_utils-0.2.25-py3-none-any.whl |
|---|---|
| Size | 24.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad607d1bdae16decc20c2c0f14144083ad65ee75f798902b99c0c156ac8623a9
|
|
BLAKE2b-256 checksum How to use checksums |
9f63bd942756007b7e322090fbd60b60f2129e66cb1ab7c2fe1843380b56a9a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.29.0 CPython/3.12.3 Linux/6.17.0-1022-azure
|
Security for telegram-sticker-utils 0.2.25
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.