Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

keralagram

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keralagram

Asynchronous Python API for building Telegram bots

  • 0.1.9
  • Source
  • PyPI
  • Socket score

Maintainers
1

KeralaGram

A python telegram asynchronous bot api made using aiohttp. This lib was earlier binded with httpx. But after the initial release we found it much slower than aiohttp. So we switched to aiohttp

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.

More examples

WILL BE SOON PUBLISHED

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc