Python SSR framework for Svelte 5 — esbuild pipeline, Node sidecar, SvelteKit-style remote functions
Project description
Fymo Framework
Production-ready Python SSR Framework for Svelte 5
Build modern web applications with Python backend and Svelte 5 frontend
Features
- Build-time esbuild pipeline — components compiled to hashed
dist/client/*.jsonce, served as cacheable static assets. - Cross-route shared chunks — packages imported by multiple pages (e.g.
date-fns) are bundled once and shared. - Persistent Node sidecar SSR — Python WSGI app talks to a long-lived Node process over stdio JSON; the sidecar imports prebuilt SSR modules and renders per request in microseconds.
- Minimal HTML response — typical page is < 10 KB; bundles loaded via
<link rel="modulepreload">+<script type="module" src=...>. fymo devwatcher — incremental rebuilds on save with SSE-driven browser reload.- Any npm library — Node SSR has full Node API surface (
fs,fetch,Buffer, streams). - Svelte 5 runes — full
$state,$derived,$effect,$propssupport.
Quick Start
Installation
pip install fymo
Create a New Project
fymo new my-app
cd my-app
Install Dependencies
pip install -r requirements.txt
npm install
Build and Serve
fymo build # produces dist/ with hashed JS/CSS bundles
fymo serve # production-style WSGI server
# or, for development:
fymo dev # incremental rebuild + browser auto-reload
Visit http://127.0.0.1:8000.
Project Structure
my-app/
├── app/
│ ├── controllers/ # Python controllers
│ ├── templates/ # Svelte components
│ ├── models/ # Data models
│ └── static/ # Static assets
├── dist/ # Built output (generated by fymo build)
├── config/ # Configuration
├── fymo.yml # Project configuration
├── server.py # Entry point
└── requirements.txt # Python dependencies
Example Component
<!-- app/templates/home/index.svelte -->
<script>
let { title, message } = $props();
let count = $state(0);
function increment() {
count++;
}
</script>
<div>
<h1>{title}</h1>
<p>{message}</p>
<button onclick={increment}>
Count: {count}
</button>
</div>
# app/controllers/home.py
def getContext():
return {
'title': 'Welcome to Fymo',
'message': 'Build amazing apps with Python and Svelte 5!'
}
CLI Commands
fymo new <project>— Create a new projectfymo build— Build for production (producesdist/)fymo serve— Serve a built projectfymo dev— Dev server with file watcher and live reloadfymo generate <type> <name>— Generate components/controllers
Configuration
Configure your project in fymo.yml:
name: my-app
version: 1.0.0
routes:
root: home.index
resources:
- posts
- users
server:
host: 127.0.0.1
port: 8000
reload: true
Architecture
Fymo combines:
- Python for server-side logic and routing (WSGI)
- Svelte 5 for reactive UI components
- esbuild for fast, incremental JS/CSS bundling at build time
- Node.js sidecar for server-side rendering via stdio JSON protocol
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Acknowledgments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fymo-0.1.0.tar.gz.
File metadata
- Download URL: fymo-0.1.0.tar.gz
- Upload date:
- Size: 355.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31de106f773299a2f150eec8c71d3e500e85249a212f05d12e22a987bf1644f9
|
|
| MD5 |
707b01e0cc663505b31fcbc0c2016a45
|
|
| BLAKE2b-256 |
cccad5543c79579d67126abd05493c3684e582293f755a237326530c40578919
|
File details
Details for the file fymo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: fymo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 352.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d9cd14e726d4f23c0fc515d410f0bfc3e1db039cc4d6313658cb5ce4f9a2b48
|
|
| MD5 |
25d1e107209f36607fc8669429120d0d
|
|
| BLAKE2b-256 |
20799e6942a629fc4f02872eaff141c5e3c6c98245199f90fd508328b67cc983
|