Metadata-Version: 2.1
Name: repid
Version: 1.5.3
Summary: Repid framework: simple to use, fast to run and extensible to adopt job scheduler
Author-Email: aleksul <me@aleksul.space>
License: MIT
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Typing :: Typed
Project-URL: Documentation, https://repid.aleksul.space
Project-URL: Funding, https://github.com/sponsors/aleksul
Project-URL: Repository, https://github.com/aleksul/repid
Project-URL: Tracker, https://github.com/aleksul/repid/issues
Requires-Python: >=3.8
Requires-Dist: typing-extensions<5.0.0,>=4.3.0; python_version < "3.10"
Requires-Dist: packaging>=22.0
Requires-Dist: aiormq<7.0.0,>=6.4.0; extra == "amqp"
Requires-Dist: croniter<3.0.0,>=2.0.0; extra == "cron"
Requires-Dist: pydantic<3.0.0,>=2.0.0; extra == "pydantic"
Requires-Dist: redis<5.1.0,>=5.0.0; extra == "redis"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Provides-Extra: amqp
Provides-Extra: cron
Provides-Extra: pydantic
Provides-Extra: redis
Provides-Extra: test
Description-Content-Type: text/markdown

<!-- markdownlint-configure-file { "MD013": { "line_length": 100 } } -->
<!-- markdownlint-disable MD033 -->

# repid

<a href="https://www.instagram.com/p/Cd-ob1NNZ84/">
  <img alt="Repid's logo" width="350" align="right" src="https://raw.githubusercontent.com/gist/aleksul/fedbe168f1fc59c5aac3ddd17ecff30a/raw/b9467303f55517d99633d6551de223cd6534b149/repid_logo_borders.svg">
</a>

[![PyPI version](https://img.shields.io/pypi/v/repid.svg)](https://pypi.org/project/repid/)
[![codecov](https://codecov.io/gh/aleksul/repid/branch/main/graph/badge.svg?token=IP3Z1VXB1G)](https://codecov.io/gh/aleksul/repid)
[![Tests](https://github.com/aleksul/repid/actions/workflows/tests.yaml/badge.svg)](https://github.com/aleksul/repid/actions/workflows/tests.yaml)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/repid.svg)](https://pypi.python.org/pypi/repid/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Read documentation](https://img.shields.io/badge/read-documentation-informational.svg)](https://repid.aleksul.space)

<br>

**Repid** framework: simple to use, fast to run and extensible to adopt job scheduler.

<br>

```bash
pip install repid
```

## Quickstart

Here is how the easiest example of producer-consumer application can look like.

Producer:

```python
import asyncio

from repid import Connection, Job, RabbitMessageBroker, Repid

app = Repid(Connection(RabbitMessageBroker("amqp://user:password@localhost:5672")))


async def main() -> None:
    async with app.magic():
        await Job(name="awesome_job").enqueue()


asyncio.run(main())
```

Consumer:

```python
import asyncio

from repid import Connection, RabbitMessageBroker, Repid, Router, Worker

app = Repid(Connection(RabbitMessageBroker("amqp://user:password@localhost:5672")))
router = Router()


@router.actor
async def awesome_job() -> None:
    print("Hello async jobs!")
    await asyncio.sleep(1.0)


async def main() -> None:
    async with app.magic():
        await Worker(routers=[router]).run()


asyncio.run(main())
```

Check out [user guide] to learn more!

## License

**Repid** is distributed under the terms of the MIT license. Please see [License.md] for more information.

**Repid's logo** is distributed under the terms of the [CC BY-NC 4.0] license.
It is originally created by [ari_the_crow_].

[License.md]: https://github.com/aleksul/repid/blob/master/LICENSE
[user guide]: https://repid.aleksul.space
[CC BY-NC 4.0]: https://creativecommons.org/licenses/by-nc/4.0/
[ari_the_crow_]: https://www.instagram.com/p/Cd-ob1NNZ84/
