Warning
The items mentioned in this part are deprecated and will be removed in a future version.
The use_typescript configuration option has been deprecated in favour of entrypoint_filename.
It has been done for the following reason(s):
- To ensure library users are not restricted to the
main.{ext}pattern when it comes to the entrypoint
- Remove the
use_typescriptfrom your configuration options - Add the
entrypoint_filenameoption to the configuration ; the value would bemain.tsif it is your webapp entrypoint's filename.
The requests package requirement has been changed for a httpx package requirement.
It has been done for the following reason(s):
- To leverage the async capabilities of httpx.AsyncClient
- Install the
httpxpackage - (Optionally, if not used elsewhere in your application) Remove the
requestspackage
Remove the usage of raw HTML strings in favour of Jinja2Templates.
It has been done for the following reason(s):
- So that library users can customize the HTML more easily, without having to override the Inertia object.
- Create a Jinja2Templates instance, for example one from
fastapi.templating.Jinja2Templates. Ensure you have a valid inertia template in the directory given to the instance. - Pass this instance to the InertiaConfig, under the
templateskey - Pass the inertia template filename to the InertiaConfig, under the
root_template_filenamekey