limited-aiogram


Namelimited-aiogram JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryThis is my first module
upload_time2024-01-14 16:02:54
maintainer
docs_urlNone
authorchazovtema
requires_python>=3.10
license
keywords aiogram limit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # What is it?

Limited aiogram is an add-on for the original aiogram Bot. This package allows you to limit how often your bot sends messages

# Telegram api limits

Telegram has a number of restrictions for sending messages:

- 30 messages per second to multiple users
- 20 requests/sec to group
- 1 message per second to individual chat

# Main Features

The following restrictions are currently implemented:

- Limit 30 requests per second for all users
-  1 message/sec to individual chats

# Usage

The code below patches the original Bot class from aiogram, these changes are not reversible!
```python
import limit_aiogram
limit_aiogram.path_bot()
```
It is also possible to use a separate class `LimitedBot``, without changing the original class

```python
import limit_aiogram
bot = limit_aiogram.LimitedBot('your token')
```

# Work in progress

A restriction for sending messages to groups will be added soon

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "limited-aiogram",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "aiogram,limit",
    "author": "chazovtema",
    "author_email": "chazovtema@mail.ru",
    "download_url": "https://files.pythonhosted.org/packages/17/d1/f26e363cd5e92b6c810291f1d3a5590dc53a07a0d4d2d078f4f840d1f3ae/limited_aiogram-0.1.1.tar.gz",
    "platform": null,
    "description": "# What is it?\r\n\r\nLimited aiogram is an add-on for the original aiogram Bot. This package allows you to limit how often your bot sends messages\r\n\r\n# Telegram api limits\r\n\r\nTelegram has a number of restrictions for sending messages:\r\n\r\n- 30 messages per second to multiple users\r\n- 20 requests/sec to group\r\n- 1 message per second to individual chat\r\n\r\n# Main Features\r\n\r\nThe following restrictions are currently implemented:\r\n\r\n- Limit 30 requests per second for all users\r\n-  1 message/sec to individual chats\r\n\r\n# Usage\r\n\r\nThe code below patches the original Bot class from aiogram, these changes are not reversible!\r\n```python\r\nimport limit_aiogram\r\nlimit_aiogram.path_bot()\r\n```\r\nIt is also possible to use a separate class `LimitedBot``, without changing the original class\r\n\r\n```python\r\nimport limit_aiogram\r\nbot = limit_aiogram.LimitedBot('your token')\r\n```\r\n\r\n# Work in progress\r\n\r\nA restriction for sending messages to groups will be added soon\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This is my first module",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [
        "aiogram",
        "limit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c26146cc81fdb4fdf76feb9d017967720271906f0fa0170c06c834a793350d94",
                "md5": "cf6ff5352abeee111d6e655a5525460f",
                "sha256": "05f44df3ff87b5fa2902a50df6d41c997d3dd79bb864fd9095a4f97fd525a565"
            },
            "downloads": -1,
            "filename": "limited_aiogram-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cf6ff5352abeee111d6e655a5525460f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 3899,
            "upload_time": "2024-01-14T16:02:52",
            "upload_time_iso_8601": "2024-01-14T16:02:52.453457Z",
            "url": "https://files.pythonhosted.org/packages/c2/61/46cc81fdb4fdf76feb9d017967720271906f0fa0170c06c834a793350d94/limited_aiogram-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17d1f26e363cd5e92b6c810291f1d3a5590dc53a07a0d4d2d078f4f840d1f3ae",
                "md5": "a54e1f07446f2964ae47863fb4811e7b",
                "sha256": "f5ee8a4d21d7348fe143ed7b26f9183a0eff30089b12490e43c39de10fd594bd"
            },
            "downloads": -1,
            "filename": "limited_aiogram-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a54e1f07446f2964ae47863fb4811e7b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 3221,
            "upload_time": "2024-01-14T16:02:54",
            "upload_time_iso_8601": "2024-01-14T16:02:54.185086Z",
            "url": "https://files.pythonhosted.org/packages/17/d1/f26e363cd5e92b6c810291f1d3a5590dc53a07a0d4d2d078f4f840d1f3ae/limited_aiogram-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-14 16:02:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "limited-aiogram"
}
        
Elapsed time: 0.18510s