Metadata-Version: 2.4
Name: concurrentor
Version: 0.1.0
Summary: Add your description here
Author-email: Shengchen Zhang <hello@shengchen.io>
Requires-Python: >=3.10
Requires-Dist: anyio>=4.12.0
Description-Content-Type: text/markdown

# Concurrentor

A simple wrapper class around anyio to help create programs that contain multiple concurrent but interacting parts.

## Usage

```python
from anyio import sleep
from concurrentor import Concurrentor, once, loop

class Application(Concurrentor):

    @enter
    async def run_once_at_enter(self):
        print("I run only once at the beginning.")

    @exit
    async def run_once_at_exit(self):
        print("I run only once at the end.")

    @loop
    async def run_repeatedly_one(self):
        print("I am called repeatedly.")
        await sleep(2)

    @loop
    async def run_repeatedly_two(self):
        print("I am called repeatedly, too.")
        await sleep(3)
```
