Name | rocketgram JSON |
Version |
6.0.4
JSON |
| download |
home_page | https://github.com/vd2org/wultiplexor |
Summary | Modern and powerful asynchronous telegram bot framework. |
upload_time | 2024-04-10 14:41:35 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <3.13,>=3.8 |
license | Copyright 2015-2024 Vd
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
telegram
bot
framework
rocketgram
async
asyncio
rocket
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Rocketgram
![TEST](https://github.com/rocketgram/rocketgram/workflows/TEST/badge.svg)
Modern and powerful asynchronous telegram bot framework.
Release news available here: [@RocketgramNews](https://t.me/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
```bash
pip install rocketgram[aiohttp]
```
#### For production
```bash
pip install uvloop rocketgram[aiohttp,orjson]
```
## Example
There is a trivial example below.
[Here](https://github.com/vd2org/rocketgram-template) is useful bot template.
```python
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](https://github.com/rocketgram/rocketgram/actions)**.
To test code manually run `pytest`:
```bash
pytest
```
Raw data
{
"_id": null,
"home_page": "https://github.com/vd2org/wultiplexor",
"name": "rocketgram",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.8",
"maintainer_email": null,
"keywords": "telegram bot framework rocketgram async asyncio rocket",
"author": null,
"author_email": "Vd <rocketgram@vd2.org>",
"download_url": "https://files.pythonhosted.org/packages/21/11/a2006af271b60a41ddd1c0900b71a61dcd20a478e194cad13ab9c82aca9e/rocketgram-6.0.4.tar.gz",
"platform": null,
"description": "# Rocketgram\n\n![TEST](https://github.com/rocketgram/rocketgram/workflows/TEST/badge.svg)\n\nModern and powerful asynchronous telegram bot framework.\n\nRelease news available here: [@RocketgramNews](https://t.me/RocketgramNews)\n\n## Dependencies\n\nAll dependencies are optional, but you should install `aiohttp` to use the framework.\n\n`orjson` or `ujson` is highly recommended to speed up json parsing.\n\nAlso, you can use `uvloop` as alternative to standard event loop.\n\n## How to install\n\n#### For development\n\n```bash\npip install rocketgram[aiohttp]\n```\n\n#### For production\n\n```bash\npip install uvloop rocketgram[aiohttp,orjson]\n```\n\n## Example\n\nThere is a trivial example below.\n[Here](https://github.com/vd2org/rocketgram-template) is useful bot template.\n\n```python\nfrom rocketgram import Bot, Dispatcher, UpdatesExecutor\nfrom rocketgram import context, commonfilters\nfrom rocketgram import SendMessage\n\ntry:\n import uvloop\n\n uvloop.install()\nexcept ImportError:\n pass\n\ntoken = f'YOUR_BOT_TOKEN'\n\nrouter = Dispatcher()\nbot = Bot(token, router=router)\n\n@router.handler\n@commonfilters.command('/start')\nasync def start_command():\n await SendMessage(context.user.id, f'Hello there!').send()\n \n@router.handler\n@commonfilters.command('/help')\nasync def start_command():\n await SendMessage(context.user.id, f'Some userful help!').send()\n \nUpdatesExecutor.run(bot)\n```\n\n# Testing\n\nCode tested automatically using `Github Actions`. \nYou can see the build status **[here](https://github.com/rocketgram/rocketgram/actions)**.\n\nTo test code manually run `pytest`:\n\n```bash\npytest\n```",
"bugtrack_url": null,
"license": "Copyright 2015-2024 Vd\n \n Permission is hereby granted, free of charge, to any person obtaining a copy of\n this software and associated documentation files (the \"Software\"), to deal in\n the Software without restriction, including without limitation the rights to\n use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n the Software, and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Modern and powerful asynchronous telegram bot framework.",
"version": "6.0.4",
"project_urls": {
"Homepage": "https://github.com/vd2org/wultiplexor",
"Issues": "https://github.com/vd2org/wultiplexor/issues",
"Repository": "https://github.com/vd2org/wultiplexor.git"
},
"split_keywords": [
"telegram",
"bot",
"framework",
"rocketgram",
"async",
"asyncio",
"rocket"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "da294824e8b39a4fca408e18a94e2d23b888623b8eec525312a171f33ec54ea9",
"md5": "030a308a9b1edbbff96f703e1e8b20cc",
"sha256": "be9d5a9529d985cdcc4926567a8e985eead3b2a6094120cbdeb8b2a66e1eac29"
},
"downloads": -1,
"filename": "rocketgram-6.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "030a308a9b1edbbff96f703e1e8b20cc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.8",
"size": 231641,
"upload_time": "2024-04-10T14:41:33",
"upload_time_iso_8601": "2024-04-10T14:41:33.668652Z",
"url": "https://files.pythonhosted.org/packages/da/29/4824e8b39a4fca408e18a94e2d23b888623b8eec525312a171f33ec54ea9/rocketgram-6.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2111a2006af271b60a41ddd1c0900b71a61dcd20a478e194cad13ab9c82aca9e",
"md5": "143fb83212c283c729d660713b2ef172",
"sha256": "fc33a7d65883877c31451e3c3486c5a64dbf910923f52b76a67d3216ef27627d"
},
"downloads": -1,
"filename": "rocketgram-6.0.4.tar.gz",
"has_sig": false,
"md5_digest": "143fb83212c283c729d660713b2ef172",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.8",
"size": 72721,
"upload_time": "2024-04-10T14:41:35",
"upload_time_iso_8601": "2024-04-10T14:41:35.709406Z",
"url": "https://files.pythonhosted.org/packages/21/11/a2006af271b60a41ddd1c0900b71a61dcd20a478e194cad13ab9c82aca9e/rocketgram-6.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-10 14:41:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vd2org",
"github_project": "wultiplexor",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "rocketgram"
}