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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tg_gateway-1.0.tar.gz
(6.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
tg_gateway-1.0-py3-none-any.whl
(10.3 kB
view details)
File details
Details for the file tg_gateway-1.0.tar.gz.
File metadata
- Download URL: tg_gateway-1.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91ebd766f06d8ec24116d5b23ee03886b597021765971ac0acffd7120d09127d
|
|
| MD5 |
078dec9afb7e6ed61d5c3b1624f06fa0
|
|
| BLAKE2b-256 |
f44311b6b14ef7f7ce21b64914295092434e56cb231d1a1f91eecf26a09cdb3f
|
File details
Details for the file tg_gateway-1.0-py3-none-any.whl.
File metadata
- Download URL: tg_gateway-1.0-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6853c3421f71cb8723f15835bd120887ca39607e71f257cfbee912625808fa2
|
|
| MD5 |
4174a3d211606d747dbcbe5ef4dfffc3
|
|
| BLAKE2b-256 |
af91ed00f818249823cf3500bf2a464927e9e31a92be6776784b97b7d572c89d
|