What's Changed
* Documentation Updates by eadwinCode in https://github.com/eadwinCode/ellar/pull/43
* Reverted building routes from a single list to a list of routers with a well-managed route not found cross routes eadwinCode in https://github.com/eadwinCode/ellar/pull/43
* Python 3.11 Support by eadwinCode in https://github.com/eadwinCode/ellar/pull/44
* Changed ASCII drawing to the image by eadwinCode in https://github.com/eadwinCode/ellar/pull/45
* Added an `IExceptionHandler` contract for defining custom exception handler by eadwinCode in https://github.com/eadwinCode/ellar/pull/46. [Doc](https://eadwincode.github.io/ellar/overview/exception_handling/)
* Dropped use for `BaseHTTPMiddleware` from Starlette and added a `FunctionBasedMiddleware` by eadwinCode in https://github.com/eadwinCode/ellar/pull/47
* Added `file` decorator for `FileResponseModel` and `StreamingResponseModel` by eadwinCode in https://github.com/eadwinCode/ellar/pull/47
python
import asyncio
from ellar.common import ModuleRouter, file
async def slow_numbers(minimum: int, maximum: int):
yield ("<html><body><ul>")
for number in range(minimum, maximum + 1):
yield "<li>%d</li>" % number
await asyncio.sleep(0.01)
yield ("</ul></body></html>")
router = ModuleRouter('/file')
router.get()
file(media_type='text/html')
def file_download():
return {'path': 'path/to/file.html', 'filename': 'code.html', 'content_disposition_type': 'attachment'}
router.get('/stream')
file(media_type='text/html', streaming=True)
def file_stream():
return slow_numbers(1, 4)
**Full Changelog**: https://github.com/eadwinCode/ellar/compare/0.2.4...0.2.6