{"library":"aiohttp-jinja2","type":"library","category":null,"description":"aiohttp-jinja2 is a Jinja2 template renderer designed for integration with aiohttp.web, the HTTP server component of the asyncio-based aiohttp library. Currently at version 1.6, it provides a stable and mature solution for serving dynamic HTML content within aiohttp applications, with releases occurring a few times a year to maintain compatibility and introduce new features.","language":"python","status":"active","version":"1.6","tags":["async","web","template","jinja2","aiohttp","renderer"],"last_verified":"Thu May 21","install":[{"cmd":"pip install aiohttp-jinja2","imports":["import aiohttp_jinja2\nfrom aiohttp import web\nimport jinja2\n\napp = web.Application()\naiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader('templates'))","from aiohttp import web\nimport aiohttp_jinja2\n\n@routes.get('/hello')\n@aiohttp_jinja2.template('index.html')\nasync def handler(request: web.Request):\n    return {'name': 'World'}","from aiohttp import web\nimport aiohttp_jinja2\n\nasync def handler(request: web.Request):\n    context = {'data': 'Some info'}\n    response = aiohttp_jinja2.render_template('page.html', request, context)\n    response.headers['Content-Language'] = 'en'\n    return response"]}],"homepage":null,"github":"https://github.com/aio-libs/aiohttp_jinja2","docs":null,"changelog":null,"pypi":"https://pypi.org/project/aiohttp-jinja2/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":4.1,"avg_import_s":0.76,"wheel_type":"wheel"},"url":"https://checklist.day/v1/registry/aiohttp-jinja2/compatibility"}}