aiohttp.web middleware to serve index files (e.g. index.html) when static directories are requested.
Project description
aiohttp.web middleware to serve index files (e.g. index.html) when static directories are requested.
Usage
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 (tested on 0.21.4)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aiohttp-index-0.1.tar.gz
(1.9 kB
view hashes)
Built Distribution
Close
Hashes for aiohttp_index-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5613baff109e5de4eab4b334c0956b0a8fae8df881ba5fbf6be1bb8b3d49a1d8 |
|
MD5 | 8483de074cc21980a90d138f29bef2b3 |
|
BLAKE2b-256 | 021fd8acec2c9eeb88edcf5dc5190d4f9df6d15048c4bf59ab3af6ba0ecae390 |