buvar-aiohttp-0.4.4
توضیحات
aiohttp plugin for buvar
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | buvar-aiohttp-0.4.4 |
| نام | buvar-aiohttp |
| نسخه کتابخانه | 0.4.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Oliver Berger |
| ایمیل نویسنده | diefans@gmail.com |
| آدرس صفحه اصلی | https://gitlab.com/diefans/buvar |
| آدرس اینترنتی | https://pypi.org/project/buvar-aiohttp/ |
| مجوز | - |
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
نیازمندی
| مقدار | نام |
|---|---|
| >=0.42.3 | buvar |
| - | aiohttp |
| >=19.1 | attrs |
| - | structlog |
| - | pendulum |
| - | uritools |
| >=4.6 | pytest |
| <3.0,>=^2.7 | pytest-cov |
| >=0.11.0 | pytest-asyncio |
| >=3.2.2<4.0 | pytest-benchmark |
| >=3.0<4.0 | mock |
| >=1.10<2.0 | pytest-mock |
| >=4.2<5.0 | pytest-watch |
| >=3.1<4.0 | pytest-randomly |
| >=0.5<1.0 | pytest-doctestplus |
| - | pytest-aiohttp |
| - | pytest-anything |
| - | pdbpp |
| >=4.6 | pytest |
| <3.0,>=^2.7 | pytest-cov |
| >=0.11.0 | pytest-asyncio |
| >=3.2.2<4.0 | pytest-benchmark |
| >=3.0<4.0 | mock |
| >=1.10<2.0 | pytest-mock |
| >=4.2<5.0 | pytest-watch |
| >=3.1<4.0 | pytest-randomly |
| >=0.5<1.0 | pytest-doctestplus |
| - | pytest-aiohttp |
| - | pytest-anything |
| - | pdbpp |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl buvar-aiohttp-0.4.4:
pip install buvar-aiohttp-0.4.4.whl
نصب پکیج tar.gz buvar-aiohttp-0.4.4:
pip install buvar-aiohttp-0.4.4.tar.gz