A microframework for Telegram bots
botogram is a MIT-licensed microframework, which aims to simplify the creation of Telegram bots. It offers a concise, simple API, which allows you to spend all your creativity in the bot, without worrying about anything else.
It also provides a robust, fully scalable bot runner process, which will be
able to process fastly high workloads. And as if this isn't enough, it has
builtin support for commands, with an automatically-generated /help
command.
import botogram
bot = botogram.create("YOUR-API-KEY")
@bot.command("hello")
def hello_command(chat, message, args):
"""Say hello to the world!"""
chat.send("Hello world")
if __name__ == "__main__":
bot.run()
You can find the documentation at botogram.pietroalbini.io.
Supported Python versions: 3.4, 3.5
botogram is currently in development, so a release doesn't exist yet.
But if you want to install it anyway, you can clone the repository and install
it with setuptools. Be sure to have Python 3.4 (or a newer version), pip,
virtualenv and setuptools installed:
$ git clone https://github.com/pietroalbini/botogram.git
$ cd botogram
$ make
$ make install
On some Linux systems you might need to wrap the make install
command with
sudo
, if you don't have root privileges.