# Proxy Messages for Aiogram
A library implementing a simple way to proxy messages from a bot to a selected channel-forum
[](https://pypi.org/project/proxy-messages-aiogram/)
[](https://pypi.org/project/proxy-messages-aiogram/)
[](https://gitlab.com/rocshers/python/proxy-messages-aiogram)
[](https://rocshers.gitlab.io/python/proxy-messages-aiogram/)
[](https://codecov.io/gitlab/rocshers:python/proxy-messages-aiogram)
[](https://pepy.tech/project/proxy-messages-aiogram)
[](https://gitlab.com/rocshers/python/proxy-messages-aiogram)
## Functionality
## Installation
`pip install proxy-messages-aiogram`
## Quick start
Mode details in [example](./test_app.py).
```python
from aiogram import Bot, Dispatcher
from proxy_messages_aiogram.proxy_managers import ProxyManager
from proxy_messages_aiogram.storages.sqlite_storage import SQLiteStorage
dp = Dispatcher()
proxy_manager = ProxyManager(
SQLiteStorage(),
{TARGET_TG_CHAT_ID},
)
@dp.message(proxy_manager.proxy_magic_filter)
async def proxy_messages_handler(message: Message) -> None:
await proxy_manager.proxy(message)
@dp.message(proxy_manager.answer_magic_filter)
async def answer_messages_handler(message: Message) -> None:
await proxy_manager.answer(message)
```
## Contribute
Issue Tracker: <https://gitlab.com/rocshers/python/proxy-messages-aiogram/-/issues>
Source Code: <https://gitlab.com/rocshers/python/proxy-messages-aiogram>
Before adding changes:
```bash
make install-dev
```
After changes:
```bash
make format test
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/rocshers/python/proxy-messages-aiogram",
"name": "proxy-messages-aiogram",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.12",
"maintainer_email": null,
"keywords": null,
"author": "Aleksei Marusich",
"author_email": "aleksei.marusich@rocshers.com",
"download_url": "https://files.pythonhosted.org/packages/6f/af/35e70620d514d3e6faeb445a580c0eafa4874609efa7f2dd9e4c12501341/proxy_messages_aiogram-0.1.7.tar.gz",
"platform": null,
"description": "# Proxy Messages for Aiogram\n\nA library implementing a simple way to proxy messages from a bot to a selected channel-forum\n\n[](https://pypi.org/project/proxy-messages-aiogram/)\n[](https://pypi.org/project/proxy-messages-aiogram/)\n[](https://gitlab.com/rocshers/python/proxy-messages-aiogram)\n[](https://rocshers.gitlab.io/python/proxy-messages-aiogram/)\n\n[](https://codecov.io/gitlab/rocshers:python/proxy-messages-aiogram)\n[](https://pepy.tech/project/proxy-messages-aiogram)\n[](https://gitlab.com/rocshers/python/proxy-messages-aiogram)\n\n## Functionality\n\n## Installation\n\n`pip install proxy-messages-aiogram`\n\n## Quick start\n\nMode details in [example](./test_app.py).\n\n```python\nfrom aiogram import Bot, Dispatcher\n\nfrom proxy_messages_aiogram.proxy_managers import ProxyManager\nfrom proxy_messages_aiogram.storages.sqlite_storage import SQLiteStorage\n\ndp = Dispatcher()\n\nproxy_manager = ProxyManager(\n SQLiteStorage(),\n {TARGET_TG_CHAT_ID},\n)\n\n@dp.message(proxy_manager.proxy_magic_filter)\nasync def proxy_messages_handler(message: Message) -> None:\n await proxy_manager.proxy(message)\n\n\n@dp.message(proxy_manager.answer_magic_filter)\nasync def answer_messages_handler(message: Message) -> None:\n await proxy_manager.answer(message)\n```\n\n## Contribute\n\nIssue Tracker: <https://gitlab.com/rocshers/python/proxy-messages-aiogram/-/issues> \nSource Code: <https://gitlab.com/rocshers/python/proxy-messages-aiogram>\n\nBefore adding changes:\n\n```bash\nmake install-dev\n```\n\nAfter changes:\n\n```bash\nmake format test\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The easiest way to proxy messages from a bot to a selected chat-forum",
"version": "0.1.7",
"project_urls": {
"Homepage": "https://gitlab.com/rocshers/python/proxy-messages-aiogram",
"Repository": "https://gitlab.com/rocshers/python/proxy-messages-aiogram"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "19891469467333982c8acb175af08e43c39d5589bd62c517e451c5e5d0e41c84",
"md5": "d90c386c57245e4bc8fa258cce59a43f",
"sha256": "258af4f1fcd5a126b883adf592b0fc5a309348e8372f310cdd6a92bf446fdf29"
},
"downloads": -1,
"filename": "proxy_messages_aiogram-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d90c386c57245e4bc8fa258cce59a43f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.12",
"size": 10368,
"upload_time": "2024-09-01T09:55:37",
"upload_time_iso_8601": "2024-09-01T09:55:37.272591Z",
"url": "https://files.pythonhosted.org/packages/19/89/1469467333982c8acb175af08e43c39d5589bd62c517e451c5e5d0e41c84/proxy_messages_aiogram-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6faf35e70620d514d3e6faeb445a580c0eafa4874609efa7f2dd9e4c12501341",
"md5": "e630f4179f4f36ecae31fb5bcaf95a07",
"sha256": "960dd7945c105d8399785917b1dceef0c6728e1389f40767408f4246e4e211c4"
},
"downloads": -1,
"filename": "proxy_messages_aiogram-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "e630f4179f4f36ecae31fb5bcaf95a07",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.12",
"size": 7262,
"upload_time": "2024-09-01T09:55:38",
"upload_time_iso_8601": "2024-09-01T09:55:38.777247Z",
"url": "https://files.pythonhosted.org/packages/6f/af/35e70620d514d3e6faeb445a580c0eafa4874609efa7f2dd9e4c12501341/proxy_messages_aiogram-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-01 09:55:38",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "rocshers",
"gitlab_project": "python",
"lcname": "proxy-messages-aiogram"
}