Metadata-Version: 2.3
Name: tg_gateway
Version: 1.0
Summary: A lightweight Telegram Gateway API SDK
Project-URL: Repository, https://github.com/py-stollen/tg_gateway
Project-URL: Documentation, https://core.telegram.org/gateway/api
Author-email: wakaree <nullmatawasoradesu@gmail.com>
Maintainer-email: wakaree <nullmatawasoradesu@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: asyncio,client,telegram,telegram-gateway,wrapper
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: pydantic<2.10,>=2.4.1
Requires-Dist: stollen~=0.2.10
Provides-Extra: dev
Requires-Dist: black~=24.8.0; extra == 'dev'
Requires-Dist: mypy~=1.11.1; extra == 'dev'
Requires-Dist: pre-commit~=3.8.0; extra == 'dev'
Requires-Dist: ruff~=0.6.1; extra == 'dev'
Description-Content-Type: text/x-rst


##########
tg_gateway
##########

**tg_gateway** is a Python library for interacting with the
`Telegram Gateway API <https://core.telegram.org/gateway>`_

Installation
------------

..  code-block:: bash

    pip install -U tg_gateway

Usage example
--------------

.. code-block:: python

    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 <https://t.me/wakaree>`_
