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 Provenance Actions
rocketgram-6.0.4.tar.gz 72.7 kB Without provenance Details for rocketgram-6.0.4.tar.gz

Built distribution (wheel)

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

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

Security for rocketgram 6.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

6.0.4 This release

2 release files No provenance

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