| Name | buvar-aiohttp JSON |
| Version |
0.5.2
JSON |
| download |
| home_page | None |
| Summary | aiohttp plugin for buvar |
| upload_time | 2025-08-14 12:25:11 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.11 |
| license | None |
| keywords |
|
| VCS |
|
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
buvar_aiohttp
=============
Solves some boilerplate around starting an `aiohttp`_ server.
.. code-block:: python
import aiohttp.web
from buvar import context, di, fork, plugin
from buvar_aiohttp import AioHttpConfig
async def hello(request):
return aiohttp.web.Response(body=b"Hello, world")
async def prepare_aiohttp(load: plugin.Loader):
# provide config
context.add(AioHttpConfig(host="0.0.0.0", port=5678))
# prepare server site
await load("buvar_aiohttp")
# mount routes
app = await di.nject(aiohttp.web.Application)
app.router.add_route("GET", "/", hello)
# start a process for each available CPU and provide a shared socket to all
# children
fork.stage(prepare_aiohttp, forks=0, sockets=["tcp://:5678"])
.. _aiohttp: https://docs.aiohttp.org
Raw data
{
"_id": null,
"home_page": null,
"name": "buvar-aiohttp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/ff/2b/a4d9ea1eec179ec01eeeab0075cb86401dba75df83f6cf0ccbce54f126b2/buvar_aiohttp-0.5.2.tar.gz",
"platform": null,
"description": "buvar_aiohttp\n=============\n\nSolves some boilerplate around starting an `aiohttp`_ server.\n\n.. code-block:: python\n\n import aiohttp.web\n from buvar import context, di, fork, plugin\n\n from buvar_aiohttp import AioHttpConfig\n\n\n async def hello(request):\n return aiohttp.web.Response(body=b\"Hello, world\")\n\n\n async def prepare_aiohttp(load: plugin.Loader):\n # provide config\n context.add(AioHttpConfig(host=\"0.0.0.0\", port=5678))\n\n # prepare server site\n await load(\"buvar_aiohttp\")\n\n # mount routes\n app = await di.nject(aiohttp.web.Application)\n app.router.add_route(\"GET\", \"/\", hello)\n\n\n # start a process for each available CPU and provide a shared socket to all\n # children\n fork.stage(prepare_aiohttp, forks=0, sockets=[\"tcp://:5678\"])\n\n\n.. _aiohttp: https://docs.aiohttp.org\n",
"bugtrack_url": null,
"license": null,
"summary": "aiohttp plugin for buvar",
"version": "0.5.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ff2ba4d9ea1eec179ec01eeeab0075cb86401dba75df83f6cf0ccbce54f126b2",
"md5": "4362997b22a2aba08bf2f0a3c2001c03",
"sha256": "1c43c88bc7bf5430eb3ed258647dbbc682f57a34fb9e2f465ba564596bc7ab4b"
},
"downloads": -1,
"filename": "buvar_aiohttp-0.5.2.tar.gz",
"has_sig": false,
"md5_digest": "4362997b22a2aba08bf2f0a3c2001c03",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 5746,
"upload_time": "2025-08-14T12:25:11",
"upload_time_iso_8601": "2025-08-14T12:25:11.633057Z",
"url": "https://files.pythonhosted.org/packages/ff/2b/a4d9ea1eec179ec01eeeab0075cb86401dba75df83f6cf0ccbce54f126b2/buvar_aiohttp-0.5.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-14 12:25:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "buvar-aiohttp"
}