Skip to main content

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/*.js once, 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 dev watcher — 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, $props support.

Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 20+ (Fymo's bundler shells out to esbuild)

Installation

pip install fymo

Create a New Project

fymo new my-app
cd my-app
npm install

Build and Serve

fymo dev             # incremental rebuild + browser auto-reload (development)

# or, for production:
fymo build           # produces dist/ with hashed JS/CSS bundles
fymo serve --prod    # gunicorn

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 project
  • fymo dev — Dev server with file watcher and live reload
  • fymo serve — Alias for fymo dev; fymo serve --prod serves a built project via gunicorn
  • fymo build — Build for production (produces dist/)
  • fymo 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

  • Built with Svelte 5
  • Bundled with esbuild
  • Inspired by modern web frameworks

Built with love by the Fymo Team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fymo-0.15.0.tar.gz (349.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fymo-0.15.0-py3-none-any.whl (230.9 kB view details)

Uploaded Python 3

File details

Details for the file fymo-0.15.0.tar.gz.

File metadata

  • Download URL: fymo-0.15.0.tar.gz
  • Upload date:
  • Size: 349.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fymo-0.15.0.tar.gz
Algorithm Hash digest
SHA256 ee99cea4bac1d28aa74b0de9a0a5b1f18d49a3a7c4439867961a43947633765a
MD5 3c00449499ddec1eef98d59dc2d6c0b1
BLAKE2b-256 bd02cf137e023fed0ce82ae22ceb725dae155cfb0c138b4477bc863498b8a997

See more details on using hashes here.

Provenance

The following attestation bundles were made for fymo-0.15.0.tar.gz:

Publisher: release.yml on Bishwas-py/fymo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fymo-0.15.0-py3-none-any.whl.

File metadata

  • Download URL: fymo-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 230.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fymo-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99a275be0c0fd31444f0f46a3c87bfbeee0ea25edd0e9aa25ceb4ac6b915e748
MD5 dbda0b9996464fa3878cd3aa1a3a6a15
BLAKE2b-256 1b39eb69e0338f3c7d6f9cd607a783a2455e590821da657d2ce8129b9f141285

See more details on using hashes here.

Provenance

The following attestation bundles were made for fymo-0.15.0-py3-none-any.whl:

Publisher: release.yml on Bishwas-py/fymo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page