Asynchronous Python API for building Telegram bots
Project description
KeralaGram
A python telegram asynchronous bot api made using httpx
Getting started.
- Installation using pip:
$ pip install keralagram
*While the API is production-ready, it is still under development and it has regular updates, do not forget to update it regularly by calling pip install keralagram --upgrade
Writing your first bot
Prerequisites
Get an API token via @BotFather. We will call this token TOKEN
.
Furthermore, you have basic knowledge of the Python programming language and more importantly the Telegram Bot API.
A simple command bot
from keralagram import KeralaGram, Dispatcher
from keralagram.types import Message
bot = KeralaGram("TOKEN")
dp = Dispatcher(bot)
# you can use a list of prefixes or a single one
# Also if the prefixes value is none defaults to "/"
@dp.on_command("start", prefixes=["!", "/"])
async def start(c: KeralaGram, m: Message):
await m.reply_text("hello")
if __name__ == '__main__':
dp.run()
The Telegram Chat Group
Get help. Discuss. Chat.
- Join the Kerala Telegram Chat Group
- We now have a Telegram Channel as well! Keep yourself up to date with API changes, and join it.
More examples
WILL BE SOON PUBLISHED
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
keralagram-0.1.5.tar.gz
(11.6 kB
view hashes)