Skip to main content

tg_gateway

tg_gateway is a Python library for interacting with the Telegram Gateway API

Installation

pip install -U tg_gateway

Usage example

import asyncio
import logging
from typing import Final

from tg_gateway import TelegramGateway

API_TOKEN: Final[str] = "YOUR_TOKEN_HERE"


async def main() -> None:
    logging.basicConfig(level=logging.DEBUG)
    gateway: TelegramGateway = TelegramGateway(api_token=API_TOKEN, force_detailed_errors=True)
    result = await gateway.send_verification_message(
        phone_number="+88812956932",
        code_length=8,
        callback_url="https://example.com",
    )
    logging.info(result)
    await gateway.session.close()


if __name__ == "__main__":
    asyncio.run(main())

Contact

For any questions or feedback, feel free to reach out to me on my Telegram

Metadata

Release files for tg-gateway 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tg-gateway 1.0
File Size Uploaded Provenance Actions
tg_gateway-1.0.tar.gz 6.8 kB Without provenance Details for tg_gateway-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tg-gateway 1.0
File Interpreter ABI Platform Actions
tg_gateway-1.0-py3-none-any.whl Python 3 none any Details for tg_gateway-1.0-py3-none-any.whl

Total release size: 17.1 kB

Release files / tg_gateway-1.0.tar.gz

Download URL tg_gateway-1.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
91ebd766f06d8ec24116d5b23ee03886b597021765971ac0acffd7120d09127d
BLAKE2b-256 checksum
How to use checksums
f44311b6b14ef7f7ce21b64914295092434e56cb231d1a1f91eecf26a09cdb3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / tg_gateway-1.0-py3-none-any.whl

Download URL tg_gateway-1.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6853c3421f71cb8723f15835bd120887ca39607e71f257cfbee912625808fa2
BLAKE2b-256 checksum
How to use checksums
af91ed00f818249823cf3500bf2a464927e9e31a92be6776784b97b7d572c89d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Security for tg-gateway 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.

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page