aiohttp-index-0.1
توضیحات
aiohttp.web middleware to serve index files (e.g. index.html) when static directories are requested.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aiohttp-index-0.1 |
| نام | aiohttp-index |
| نسخه کتابخانه | 0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Katherine Crowson |
| ایمیل نویسنده | crowsonkb@gmail.com |
| آدرس صفحه اصلی | https://github.com/crowsonkb/aiohttp_index |
| آدرس اینترنتی | https://pypi.org/project/aiohttp-index/ |
| مجوز | MIT |
aiohttp\_index
==============
`aiohttp.web <http://aiohttp.readthedocs.org/en/stable/>`__ middleware to
serve index files (e.g. index.html) when static directories are requested.
Usage
-----
.. code:: python
from aiohttp import web
from aiohttp_index import IndexMiddleware
app = web.Application(middlewares=[IndexMiddleware()])
app.router.add_static('/', 'static')
``app`` will now serve ``static/index.html`` when ``/`` is requested.
Dependencies
------------
- Python 3.5+
- `aiohttp <http://aiohttp.readthedocs.org/en/stable/>`__ (tested on
0.21.4)
نحوه نصب
نصب پکیج whl aiohttp-index-0.1:
pip install aiohttp-index-0.1.whl
نصب پکیج tar.gz aiohttp-index-0.1:
pip install aiohttp-index-0.1.tar.gz