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)

TBD Required features for launch

  • Deploy tools
  • Swap migrations to tortoise-pathway once cross-app migrations are supported
  • Config with secrets encryption
  • Package/share modules with git
  • Docs

Features in development

  • CRUD
  • Caching
  • User module
  • Dev tools module
  • Admin panel module

Dreams

  • Move node_modules into +node

Other TODO

  • Swap to copier for template creation
  • Textual CLI app / installer / dev tools?
  • Resolve duplicate types in openapi spec (due to model serializers)

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.4.4.tar.gz (17.0 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.4.4-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coloco-0.4.4.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.25.1 CPython/3.13.4 Linux/6.11.0-1015-azure

File hashes

Hashes for coloco-0.4.4.tar.gz
Algorithm Hash digest
SHA256 bcb8490bcd37c0db620ff219d5ff9cc2bca6057a444452f11067472da46c6f7a
MD5 b2cdc23bc7b71cf0b5e2979b306c9762
BLAKE2b-256 3467a11d9372aee640f675451083866e79e87ca57f0cf8c248c2a3ce2ddb158f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coloco-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.25.1 CPython/3.13.4 Linux/6.11.0-1015-azure

File hashes

Hashes for coloco-0.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 afb7b7ae3a2f7d2ecc6fb9022171983a91b9af4e7652409a30f9f9de4e434bfd
MD5 63f9a7501970859bc8daeddb50087b15
BLAKE2b-256 1d6bc001420f0d6b29b7e7970db11ab59e38bbd39ffce5c4cdf6946f51f11e2c

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