Simple Combination of FastAPI and Svelte.
git clone https://github.com/Gingerbreadfork/fastapi-svelte
pip install -r requirements.txt
to install python dependencies (ideally in a virtualenv or similar - don't be a savage).npm create vite@latest client -- --template svelte
inside root directory to create Svelte app inside client
directory.client
directory run npm install
Build Svelte app if you haven't yet (and after any future changes) with npm run build
inside client folder
In a second terminal run a Uvicorn server (ideally with hotreloading so it refreshes after new builds of the app are generated): uvicorn main:app --reload
You can build some pretty interesting/weird little apps using FastAPI to create a few endpoints while also serving a nice little frontend Svelte client at the same time.