{"repo":"mikeckennedy/fastapi-chameleon","free":true,"listed":false,"github":"https://github.com/mikeckennedy/fastapi-chameleon","clone":"git clone https://github.com/mikeckennedy/fastapi-chameleon.git","description":"Adds integration of the Chameleon template language to FastAPI. #pypackage","language":"Python","stars":226,"topics":["chameleon","fastapi","fastapi-template","python","web"],"license":"MIT","category":"ai-agents","readme_excerpt":"fastapi-chameleon Adds integration of the Chameleon template language to FastAPI. If you are interested in Jinja instead, see the sister project: github.com/AGeekInside/fastapi-jinja. Documentation: full docs and a per-function API reference live at mkennedy.codes/docs/fastapi-chameleon. An llms.txt index is available for AI coding tools. Features - One decorator turns a FastAPI view into a server-rendered HTML page: return a dict , get a rendered template. - Sync and async views are both fully supported. - fastapi.Response pass-through : return a Response (redirect, JSON, etc.) from a decorated view and the template is skipped entirely. - Friendly error pages : not found() renders a custom 404 page, generic error() renders any template with any status code. - Template name inference : leave the template name off and it's derived from the module and function name. - Dev mode : auto reload=True picks up template edits without restarting the server. - Fully typed : ships inline type hints with a py.typed marker (PEP 561). The decorator uses ParamSpec -based overloads and functools.wraps , so a decorated view keeps its exact parameter signature — FastAPI's dependency injection and type checkers like ty and pyrefly keep working. - Tiny dependency footprint : just fastapi and chameleon . Installation Quick start A minimal but complete app — two files. main.py templates/index.pt Run it with python main.py (or uvicorn main:app ) and visit http://127.0.0.1:8000 . The dict returned fr","default_branch":null,"files":null,"tree":[],"storefront":"/r/mikeckennedy","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mikeckennedy/fastapi-chameleon/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}