{"id":17030160,"url":"https://github.com/rob-blackbourn/bareasgi-jinja2","last_synced_at":"2026-01-18T17:33:29.559Z","repository":{"id":46607672,"uuid":"167530525","full_name":"rob-blackbourn/bareASGI-jinja2","owner":"rob-blackbourn","description":"Jinja2 support for bareasgi","archived":false,"fork":false,"pushed_at":"2024-01-11T22:05:45.000Z","size":1508,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-15T00:56:03.471Z","etag":null,"topics":["asgi","asyncio","bareasgi","bareasgi-jinja2","jinja2","jinja2-support","python","web"],"latest_commit_sha":null,"homepage":"https://rob-blackbourn.github.io/bareASGI-jinja2/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rob-blackbourn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-25T10:33:46.000Z","updated_at":"2024-07-29T20:29:13.643Z","dependencies_parsed_at":"2024-07-29T20:29:10.178Z","dependency_job_id":"ab528b98-0540-46be-80a0-0f25eb7b449a","html_url":"https://github.com/rob-blackbourn/bareASGI-jinja2","commit_stats":{"total_commits":34,"total_committers":4,"mean_commits":8.5,"dds":0.5,"last_synced_commit":"ed3700c195bc51f268d88dff59bb16455a5ef175"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-blackbourn%2FbareASGI-jinja2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-blackbourn%2FbareASGI-jinja2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-blackbourn%2FbareASGI-jinja2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-blackbourn%2FbareASGI-jinja2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rob-blackbourn","download_url":"https://codeload.github.com/rob-blackbourn/bareASGI-jinja2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247399886,"owners_count":20932880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asgi","asyncio","bareasgi","bareasgi-jinja2","jinja2","jinja2-support","python","web"],"created_at":"2024-10-14T08:04:41.200Z","updated_at":"2026-01-18T17:33:29.532Z","avatar_url":"https://github.com/rob-blackbourn.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bareASGI-jinja2\n\nJinja2 support for [bareASGI](http://github.com/rob-blackbourn/bareasgi)\n(read the [documentation](https://rob-blackbourn.github.io/bareASGI-jinja2/))\n\n## Usage\n\nTry the following.\n\n```python\nfrom typing import Mapping, Any\nimport jinja2\nimport os.path\nimport uvicorn\nfrom bareasgi import Application\nfrom bareasgi_jinja2 import Jinja2TemplateProvider, add_jinja2\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\nasync def http_request_handler(request: HttpRequest) -\u003e HttpResponse:\n    \"\"\"Handle the request\"\"\"\n    template = 'example1.html'\n    variables = {'name': 'rob'}\n    return await Jinja2TemplateProvider.apply(request, template, variables)\n\napp = Application()\n\nenv = jinja2.Environment(\n    loader=jinja2.FileSystemLoader(os.path.join(here, 'templates')),\n    autoescape=jinja2.select_autoescape(['html', 'xml']),\n    enable_async=True\n)\n\nadd_jinja2(app, env)\n\napp.http_router.add({'GET'}, '/example1', http_request_handler)\n\nuvicorn.run(app, port=9010)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob-blackbourn%2Fbareasgi-jinja2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frob-blackbourn%2Fbareasgi-jinja2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob-blackbourn%2Fbareasgi-jinja2/lists"}