Metadata-Version: 2.4
Name: anyio-executor
Version: 0.1.0
Summary: anyio implementation of an asynchronous Executor.
Author-email: Vizonex <VizonexBusiness@gmail.com>
Project-URL: repository, https://github.com/Vizonex/anyio-executor.git
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiologic>=0.16.0
Requires-Dist: anyio>=4.13.0
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# Anyio-Executor
Inspired by the newer [aiolibs-executor](https://github.com/aio-libs/aiolibs-executor) library
this library provides an asynchronous executor support for anyio and has compatability
with 3.10 and newer version of python.


```python
import anyio

from anyio_executor import Executor


async def fn(i: int):
    await anyio.sleep(i)
    print(f"{i} done!")
    return i

async def main():
    async with Executor(10) as e:
        items = await e.map(fn, [1, 2, 1, 2, 3])
    print(items)

    async with Executor(10) as e:
        # it will also take async for iterations.
        async for i in e.map(fn, [1, 2, 1, 2, 3]):
            print(i)

if __name__ == "__main__":
    anyio.run(main)
```
