Skip to main content

A kit for creating FastAPI + Svelte applications

Project description

Coloco

A kit for creating full-stack apps with co-located code, built on FastAPI and Svelte. Bundle your front-end and back-end code and easily tie them together with codegen.

Example:

hello/api.py

from coloco import api

@api
def test(name: str):
    return f"Hello {name}!"

hello/index.svelte

<script lang="ts">
  import { test } from "./api";
</script>

{#await test({ name: "Coloco" })}
	Loading...
{:then result}
	The server says {result}
{/await}

Serves the page myapp.com/hello, which calls myapp.com/hello/test?name=Coloco and prints the message Hello Coloco!

Getting Started

  • pip install coloco
  • coloco createapp myapp
  • From myapp - coloco dev

Running in Production

  • coloco build
  • Artifacts will be saved to dist
  • From dist, run coloco serve

Opinions

This framework is opinionated and combines the following excellent tools:

  • FastAPI
  • Svelte
  • openapi-ts (codegen)
  • svelte5-router (file-based routing)
  • tortoise-orm (optional)

Plans

  • Deploy tools
  • Migrations for ORM - aerich (Improvements needed, watching tortoise-pathway)
  • CRUD
  • Caching
  • Package/share modules with git

Dreams

  • Move node_modules into +node
  • Somehow clean up litter from uv

TODO

  • Swap to cyclopts for CLI
  • Swap to copier for template creation
  • Textual CLI app / installer / dev tools?
  • Common dev admin module

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

coloco-0.3.5.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

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

coloco-0.3.5-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file coloco-0.3.5.tar.gz.

File metadata

  • Download URL: coloco-0.3.5.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.24.2 CPython/3.13.3 Linux/6.11.0-1014-azure

File hashes

Hashes for coloco-0.3.5.tar.gz
Algorithm Hash digest
SHA256 c174b7d89249dcb63cacd2a473c5f1472bc1966fd7feb7ee8cfd18908c713c0d
MD5 0a79e57a63b83cc9bf6076b2ac17391f
BLAKE2b-256 ced987c5f2099b47ff4cdf8848d1773da084804f018fa6bffd1373c635afd821

See more details on using hashes here.

File details

Details for the file coloco-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: coloco-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.24.2 CPython/3.13.3 Linux/6.11.0-1014-azure

File hashes

Hashes for coloco-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 eee9f40fcb3c3ec1fb03f5123046d780b88402fd5bf3b326fe1b67f3e1d9926a
MD5 ed2205a42c2120876d785a6566d4c05b
BLAKE2b-256 cc38b812acbb0f64d0df3b06463d3e3f081556b5e102a084164b293151834ea0

See more details on using hashes here.

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