All Projects → rocketgram → Rocketgram

rocketgram / Rocketgram

Licence: mit
Modern and powerful asynchronous telegram bot framework.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Rocketgram

Telegram Bot Swift
Telegram Bot SDK for Swift (unofficial)
Stars: ✭ 275 (+643.24%)
Mutual labels:  bot, bots, telegram
Arsenic
Async WebDriver implementation for asyncio and asyncio-compatible frameworks
Stars: ✭ 209 (+464.86%)
Mutual labels:  asyncio, aiohttp, tornado
Aiotg
Asynchronous Python library for building Telegram bots
Stars: ✭ 374 (+910.81%)
Mutual labels:  bot, asyncio, telegram
Java Telegram Bot Tutorial
Java Telegram Bot Tutorial. Feel free to submit issue if you found a mistake.
Stars: ✭ 165 (+345.95%)
Mutual labels:  bot, bots, telegram
Awesome Bots
Awesome Links about bots.
Stars: ✭ 412 (+1013.51%)
Mutual labels:  bot, bots, telegram
Pyrobot
Telegram Userbot powered by Pyrogram
Stars: ✭ 23 (-37.84%)
Mutual labels:  bot, telegram
Aiomixcloud
Mixcloud API wrapper for Python and Async IO
Stars: ✭ 23 (-37.84%)
Mutual labels:  asyncio, aiohttp
Vk To Telegram
Utility to forward posts from VK through callback API to telegram channel or chat
Stars: ✭ 24 (-35.14%)
Mutual labels:  bot, telegram
V3n0m Scanner
Popular Pentesting scanner in Python3.6 for SQLi/XSS/LFI/RFI and other Vulns
Stars: ✭ 847 (+2189.19%)
Mutual labels:  asyncio, aiohttp
Inventory Hunter
⚡️ Get notified as soon as your next CPU, GPU, or game console is in stock
Stars: ✭ 778 (+2002.7%)
Mutual labels:  bot, telegram
Disatbot
DABOT: Disaster Attention Bot
Stars: ✭ 26 (-29.73%)
Mutual labels:  bot, telegram
Tnt Village Bot
Bot Telegram per la ricerca di release pubblicate da TNTVillage
Stars: ✭ 37 (+0%)
Mutual labels:  bot, telegram
Telegram Standup Bot
Very simple telegram bot for submitting daily standups
Stars: ✭ 20 (-45.95%)
Mutual labels:  bot, telegram
Mypackbot
🤖 Your own unlimited pack of Telegram-stickers
Stars: ✭ 18 (-51.35%)
Mutual labels:  bot, telegram
Aioslacker
slacker wrapper for asyncio
Stars: ✭ 23 (-37.84%)
Mutual labels:  asyncio, aiohttp
Java Telegram Bot Api
Telegram Bot API for Java
Stars: ✭ 819 (+2113.51%)
Mutual labels:  bot, telegram
Money bot
Docker-containered bot. Added to a group chat, she replies to any message containing price and currency pattern. Live!
Stars: ✭ 8 (-78.38%)
Mutual labels:  bot, telegram
Rssbot
Lightweight Telegram RSS bot for notifications only. 用于消息通知的轻量级 Telegram RSS 机器人
Stars: ✭ 952 (+2472.97%)
Mutual labels:  bot, telegram
Heroku Aiohttp Web
A project starter template for deploying an aiohttp app to Heroku
Stars: ✭ 14 (-62.16%)
Mutual labels:  asyncio, aiohttp
Spytrojan keylogger
[Solo para programadores] Troyano espía | Keylogger solo para Windows, se replica en el sistema y se inicia automaticamente al iniciar sesión. | Envío de registro mediante [Base de Datos], [Gmail] o [BotTelegram].
Stars: ✭ 32 (-13.51%)
Mutual labels:  bot, telegram

Rocketgram

TEST

Modern and powerful asynchronous telegram bot framework.

Release news available here: @RocketgramNews

How to install

For development

pip install rocketgram[aiohttp]

For production

pip install rocketgram[aiohttp,ujson]

Dependencies

All dependencies are optional but you should install one of aiohttp and tornado to use framework.

ujson is highly recommended to speedup json parsing.

Also you can use uvloop as alternative to standard event loop.

  • Python >= 3.7
  • aiohttp >= 3.5.4
  • ujson >= 1.35
  • tornado >= 6.0.2
  • uvloop >= 0.12.1

Example

There is a trivial example below. Here is useful bot template.

from rocketgram import Bot, Dispatcher, UpdatesExecutor
from rocketgram import context, commonfilters
from rocketgram import SendMessage

token = 'YOUR_BOT_TOKEN'

router = Dispatcher()
bot = Bot(token, router=router)

@router.handler
@commonfilters.command('/start')
async def start_command():
    await SendMessage(context.user.user_id, 'Hello there!').send()
    
@router.handler
@commonfilters.command('/help')
async def start_command():
    await SendMessage(context.user.user_id, 'Some userful help!').send()
    
UpdatesExecutor.run(bot)

Testing

Code tested automatically using Github Actions. You can see build status here.

To test code manually install and run pytest:

pip install pytest
python -m pytest
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].