Installation
The whole library is one module with one dependency, so this page is short. Install it with uv or pip:
uv add jinja-partials
# or
pip install jinja-partialsOne small trap right at the door: the PyPI name has a hyphen and the import has an underscore. Python packaging has its traditions.
import jinja_partialsThe only runtime dependency is jinja2. The package is pure Python, fully typed, and ships a py.typed marker, so your editor and type checker know what render_partial returns before you do.
Python versions
Python 3.10 or newer. If you install on an older interpreter, pip does not refuse; it quietly hands you 0.3.0, the last release that supported 3.8 and 3.9. That version has Flask, plain Jinja2, and synchronous Starlette registration, but none of the Quart and FastAPI support or the lifecycle-managed Starlette registration this guide describes. If a function on these pages is mysteriously missing, check which version you actually got.
Bring your own framework
jinja_partials does not install Flask, Quart, FastAPI, or Starlette. It looks for each one at import time, uses it if present, and otherwise carries on without it. Install the framework you use alongside the library, in the same environment. If you call a registration function for a framework that is not there, you get a PartialsException that says so plainly, for example Install Quart to use register_quart_extensions. No mystery tracebacks from three layers down.
Check the install
python -c "import jinja_partials; print(jinja_partials.__version__)"The version is read from the installed package metadata, so it always tells the truth about what is in the environment. With that done, the Quickstart is next.