Server-side installation
Install Cross-Inertia using pip:
pip install cross-inertiaOr with uv:
uv add cross-inertiaClient-side installation
Install the Inertia.js client adapter for your framework of choice:
React
bun add @inertiajs/react react react-domVue
bun add @inertiajs/vue3 vueSvelte
bun add @inertiajs/svelte svelteFramework-specific dependencies
FastAPI
For FastAPI, you'll need Jinja2 for templating:
pip install jinja2Django
Django works out of the box with its built-in template engine. Just add to your installed apps:
INSTALLED_APPS = [
# ...
'cross_inertia.django',
]SSR support
For server-side rendering support (both frameworks):
pip install httpxBuild tools
We recommend using Vite for building your frontend assets:
bun add -d vite @vitejs/plugin-react typescriptVerification
You can verify your installation by importing Cross-Inertia:
FastAPI
from cross_inertia.fastapi import InertiaDep, inertia_share
print("Cross-Inertia installed successfully!")Django
from cross_inertia.django import render, InertiaMiddleware
print("Cross-Inertia installed successfully!")