vilha


Namevilha JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
SummaryASGI server for amqp rpc protocol
upload_time2024-03-25 13:49:34
maintainerNone
docs_urlNone
authorYour Name
requires_python<4.0,>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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()
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "vilha",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/49/9a/6571cd6078cd43cb92e7d530c8f9f66afb311ece950d7578615623be449f/vilha-0.0.2.tar.gz",
    "platform": null,
    "description": "# Vilha\n\nRpc server inspired by nameko and aims to `extend` asgi protocol to allow use of asgi middlewares and starlette\nwith DI inspired by FastAPI\n\n# Example \n```python\nimport asyncio\nfrom vilha.server import Vilha\nfrom vilha.starlette.applications import RpcRoute, Starlette\nfrom vilha.di import Depends\nimport random\n\nasync def get_rnd():\n    return random.randint(0,100)\n\nasync def test_method(rnd: Annotated[int, Depends(get_rnd)]):\n    print(\"test_method\")\n    return rnd\n\n\nst = Starlette(routes=[RpcRoute(\"test_method\", test_method)])\n\n\nasync def main():\n    await Vilha(\"test_service\").run(st)\n\n\nloop = asyncio.get_event_loop()\nloop.create_task(main())\n\nloop.run_forever()\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "ASGI server for amqp rpc protocol",
    "version": "0.0.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "427c021b16da79df34c613615372e79a15e38cf8019b90990e7fcb7a8700e115",
                "md5": "57c774d6571771e2ff1bb5fd4365919b",
                "sha256": "c459b1b490331184e141f50d864ea8679f82668f5acdbccb4789e9353fd7b958"
            },
            "downloads": -1,
            "filename": "vilha-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "57c774d6571771e2ff1bb5fd4365919b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 14585,
            "upload_time": "2024-03-25T13:49:33",
            "upload_time_iso_8601": "2024-03-25T13:49:33.387606Z",
            "url": "https://files.pythonhosted.org/packages/42/7c/021b16da79df34c613615372e79a15e38cf8019b90990e7fcb7a8700e115/vilha-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "499a6571cd6078cd43cb92e7d530c8f9f66afb311ece950d7578615623be449f",
                "md5": "3b8102363cec9adaa14413941d2a8233",
                "sha256": "6b143868e982639201913433ab13034a45695715a6994a30883113aa4dba21ff"
            },
            "downloads": -1,
            "filename": "vilha-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3b8102363cec9adaa14413941d2a8233",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 9342,
            "upload_time": "2024-03-25T13:49:34",
            "upload_time_iso_8601": "2024-03-25T13:49:34.569886Z",
            "url": "https://files.pythonhosted.org/packages/49/9a/6571cd6078cd43cb92e7d530c8f9f66afb311ece950d7578615623be449f/vilha-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-25 13:49:34",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "vilha"
}
        
Elapsed time: 0.25658s