Skip to main content

TGCoreSDK | Enterprise Telegram Bot API Framework.

Project description

TGCore SDK

Enterprise Telegram Bot Framework • Secure • Scalable • Zero-Trust Ready

Maintained PRs Security Architecture FastAPI MongoDB Async Webhook tgcore Python License

The most secure Telegram Bot SDK ever built.

✨ Features

  • ⚡ Async native ("async/await")
  • 🔐 Secure API key authentication
  • 🤖 Multi-bot token support
  • 🔁 Token rotation ready
  • 🧩 Builder pattern + simple calls
  • 📦 Auto-generated methods from OpenAPI schema
  • 📚 Auto docstring generation
  • 🏗 Enterprise-ready architecture

📦 Installation

pip install tgcore

Or install locally:

pip install -e .


🔑 Authentication

Create client instance:

from tgcore import Client

client = Client("fw_live_xxx")

await client.telegram.send_message(
    chat_id="@channel",
    text="hello"
)

👾 Usage

Simple Call

await client.telegram.send_message(
    chat_id="@channel",
    text="Hello world"
)

Builder Pattern

await (
    client.telegram
        .send_photo_call(chat_id="@channel", photo="https://img.jpg")
        .execute()
)

🔄 Token Rotation Support

The server supports storing encrypted tokens using AES-256-GCM. The SDK automatically uses the active token version.

🔒 Security Model

TgCoreSDK never exposes bot tokens to clients.

Flow:

Client → API Gateway → Decrypt → Telegram API

Benefits:

  • prevents token leaks
  • safe frontend usage
  • safe monitoring dashboards
  • supports IP restrictions

🧾 License

Licensed under Apache License 2.0

You may:

  • use commercially
  • modify
  • distribute
  • sublicense

🤝 Contributing

Pull requests welcome. For major changes, open an issue first to discuss what you would like to change.


🔥 Status

Production Ready


👑 Author

Built with ❤️ by Randy W

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

tgcore-1.0.10.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

tgcore-1.0.10-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file tgcore-1.0.10.tar.gz.

File metadata

  • Download URL: tgcore-1.0.10.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tgcore-1.0.10.tar.gz
Algorithm Hash digest
SHA256 9878ee9056b9b442952d2582e2bcc9725a674bb5f1335bf7b22c6b6f6579b5d8
MD5 68ccc1118589e9ce6ad08f937451d09f
BLAKE2b-256 5b0a61de5ab08c152b0ff4e209189f60b6fb81c49f1dd533785b89a4a168d81c

See more details on using hashes here.

File details

Details for the file tgcore-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: tgcore-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tgcore-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a25d5c62a4473485342e485c0dd622557f6844b5c5caabe441031b41eb263fd0
MD5 083d5f118bcac65337dfc952c8b55f14
BLAKE2b-256 3886860eab6211880bb8444e4b7038efd49b2b8e00199acf9b14b4c60a896b86

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