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

  • 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
  • ORM Support
  • SQLite/Postgres support
  • 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.2.tar.gz (14.3 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.2-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coloco-0.3.2.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.24.1 CPython/3.13.3 Linux/6.11.0-1012-azure

File hashes

Hashes for coloco-0.3.2.tar.gz
Algorithm Hash digest
SHA256 695616c99c38a42a8ded30a81f6ed0b943bb9e689a3138e11c54fc4027e7839a
MD5 9c113b5258bd8b12d9ea1909b4dd17aa
BLAKE2b-256 8c28ac36d1629d8140343a437a3c61d76155a04eb463da3d9839bdded1343112

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for coloco-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8279d80d41fbdac58802a3f4d1ba5ee49e4fdd5068523dca7b6bb4d140849bb2
MD5 a860b9fecb60e2a4ec73b71a5b3e2639
BLAKE2b-256 8e2c623b29905c5bb4c547fa45dcc4b969f1e29dcf515684a80fd0810be11ec0

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