Metadata-Version: 2.1
Name: proxy-messages-aiogram
Version: 0.1.0
Summary: The easiest way to proxy messages from a bot to a selected channel-forum
Home-page: https://gitlab.com/rocshers/python/proxy-messages-aiogram
License: MIT
Author: Aleksei Marusich
Author-email: aleksei.marusich@rocshers.com
Requires-Python: >=3.9,<4
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: System :: Software Distribution
Requires-Dist: aiogram (>=3.10.0,<4.0.0)
Requires-Dist: xxhash (>=3.4.1,<4.0.0)
Project-URL: Repository, https://gitlab.com/rocshers/python/proxy-messages-aiogram
Description-Content-Type: text/markdown

# Proxy Messages for Aiogram

A library implementing a simple way to proxy messages from a bot to a selected channel-forum

[![PyPI](https://img.shields.io/pypi/v/proxy-messages-aiogram)](https://pypi.org/project/proxy-messages-aiogram/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/proxy-messages-aiogram)](https://pypi.org/project/proxy-messages-aiogram/)
[![GitLab last commit](https://img.shields.io/gitlab/last-commit/rocshers/python/proxy-messages-aiogram)](https://gitlab.com/rocshers/python/proxy-messages-aiogram)
[![Docs](https://img.shields.io/badge/docs-exist-blue)](https://rocshers.gitlab.io/python/proxy-messages-aiogram/)

[![Test coverage](https://codecov.io/gitlab/rocshers:python/proxy-messages-aiogram/graph/badge.svg?token=3C6SLDPHUC)](https://codecov.io/gitlab/rocshers:python/proxy-messages-aiogram)
[![Downloads](https://static.pepy.tech/badge/proxy-messages-aiogram)](https://pepy.tech/project/proxy-messages-aiogram)
[![GitLab stars](https://img.shields.io/gitlab/stars/rocshers/python/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 proxy_messages_aiogram.proxy_managers import ProxyManager
from proxy_messages_aiogram.storages.redis_topic_storages import RedisTopicStorage

proxy_manager = ProxyManager(
    RedisTopicStorage(
        host='localhost',
        db=1,
    ),
    {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
```

