Skip to main content

Rocketgram

TEST

Modern and powerful asynchronous telegram bot framework.

Release news available here: @RocketgramNews

Dependencies

All dependencies are optional, but you should install aiohttp to use the framework.

orjson or ujson is highly recommended to speed up json parsing.

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

How to install

For development

pip install rocketgram[aiohttp]

For production

pip install uvloop rocketgram[aiohttp,orjson]

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

try:
    import uvloop

    uvloop.install()
except ImportError:
    pass

token = f'YOUR_BOT_TOKEN'

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

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

Testing

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

To test code manually run pytest:

pytest

Metadata

Release files for rocketgram 6.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rocketgram 6.0.4
File Size Uploaded
rocketgram-6.0.4.tar.gz 72.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rocketgram 6.0.4
File Interpreter ABI Platform
rocketgram-6.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 304.4 kB

Release files / rocketgram-6.0.4.tar.gz

Download URL rocketgram-6.0.4.tar.gz
Size 72.7 kB
Tags Source
SHA-256 checksum
How to use checksums
fc33a7d65883877c31451e3c3486c5a64dbf910923f52b76a67d3216ef27627d
BLAKE2b-256 checksum
How to use checksums
2111a2006af271b60a41ddd1c0900b71a61dcd20a478e194cad13ab9c82aca9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.13.3 CPython/3.12.2 Linux/6.5.0-1017-azure

Release files / rocketgram-6.0.4-py3-none-any.whl

Download URL rocketgram-6.0.4-py3-none-any.whl
Size 231.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be9d5a9529d985cdcc4926567a8e985eead3b2a6094120cbdeb8b2a66e1eac29
BLAKE2b-256 checksum
How to use checksums
da294824e8b39a4fca408e18a94e2d23b888623b8eec525312a171f33ec54ea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.13.3 CPython/3.12.2 Linux/6.5.0-1017-azure

Release history Release notifications | RSS feed

This release

6.0.4 This release

2 release files

6.0.3

2 release files

6.0.2

2 release files

6.0.1

2 release files

6.0.0

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.0

2 release files

3.4.0

2 release files

3.3.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.1

2 release files

2.0

2 release files

1.8

2 release files

1.7

2 release files

1.6.1

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page