Server-side installation

Install Cross-Inertia using pip:

pip install cross-inertia

Or with uv:

uv add cross-inertia

Client-side installation

Install the Inertia.js client adapter for your framework of choice:

React

bun add @inertiajs/react react react-dom

Vue

bun add @inertiajs/vue3 vue

Svelte

bun add @inertiajs/svelte svelte

Framework-specific dependencies

FastAPI

For FastAPI, you'll need Jinja2 for templating:

pip install jinja2

Django

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 httpx

Build tools

We recommend using Vite for building your frontend assets:

bun add -d vite @vitejs/plugin-react typescript

Verification

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!")