Metadata-Version: 2.1
Name: vilha
Version: 0.0.2
Summary: ASGI server for amqp rpc protocol
Author: Your Name
Author-email: you@example.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: aiormq (>=6.8.0,<7.0.0)
Requires-Dist: starlette (>=0.37.2,<0.38.0)
Requires-Dist: typing-extensions (>=4.10.0,<5.0.0)
Description-Content-Type: text/markdown

# Vilha

Rpc server inspired by nameko and aims to `extend` asgi protocol to allow use of asgi middlewares and starlette
with DI inspired by FastAPI

# Example 
```python
import asyncio
from vilha.server import Vilha
from vilha.starlette.applications import RpcRoute, Starlette
from vilha.di import Depends
import random

async def get_rnd():
    return random.randint(0,100)

async def test_method(rnd: Annotated[int, Depends(get_rnd)]):
    print("test_method")
    return rnd


st = Starlette(routes=[RpcRoute("test_method", test_method)])


async def main():
    await Vilha("test_service").run(st)


loop = asyncio.get_event_loop()
loop.create_task(main())

loop.run_forever()
```

