aiotg
=====

.. image:: https://travis-ci.org/szastupov/aiotg.svg?branch=master
    :target: https://travis-ci.org/szastupov/aiotg

Asynchronous Python API for building Telegram bots

Install it with pip:

.. code:: sh

    pip install aiotg

Then you can create a new bot in few lines:

.. code:: python

    import os
    from aiotg import TgBot

    bot = TgBot(os.environ["API_TOKEN"])

    @bot.command(r"/echo (.+)")
    def echo(chat, match):
        return chat.reply(match.group(1))

    if __name__ == '__main__':
        bot.run()

Run it with a proper API\_TOKEN and it should reply to /echo commands.

For a more complete example, take a look at
`WhatisBot <https://github.com/szastupov/whatisbot/blob/master/main.py>`__.

Have a question? Ask it on our `Telegram chat <https://telegram.me/joinchat/ABwEXgGJsOukSVJDgVBeFg>`__.

aiotg
=====

.. image:: https://travis-ci.org/szastupov/aiotg.svg?branch=master
    :target: https://travis-ci.org/szastupov/aiotg

Asynchronous Python API for building Telegram bots

Install it with pip:

.. code:: sh

    pip install aiotg

Then you can create a new bot in few lines:

.. code:: python

    import os
    from aiotg import TgBot

    bot = TgBot(os.environ["API_TOKEN"])

    @bot.command(r"/echo (.+)")
    def echo(chat, match):
        return chat.reply(match.group(1))

    if __name__ == '__main__':
        bot.run()

Run it with a proper API\_TOKEN and it should reply to /echo commands.

For a more complete example, take a look at
`WhatisBot <https://github.com/szastupov/whatisbot/blob/master/main.py>`__ or `Music Catalog Bot <https://github.com/szastupov/musicbot>`__.

Have a question? Ask it on our `Telegram chat <https://telegram.me/joinchat/ABwEXgGJsOukSVJDgVBeFg>`__.

Add link to Music Catalog Bot
Add link to Music Catalog Bot