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) -> str:
    return f"Hello {name}!"

hello/index.svelte

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

  const response = test({ query: { name: "Coloco" } });
</script>

{#if $response.loading}
    Loading...
{:else}
    The server says {$response.data}
{/if}

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

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

Dreams

  • Move node_modules into +node
  • Remove the need for query, params, body for simple REST requests (maybe use legacy client but support the new one?)

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.1.2.tar.gz (11.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.1.2-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coloco-0.1.2.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.22.3 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for coloco-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0dea30a3a5c5e414cf7cd7776008059ecb4876707ca74b6664fb167c92501b88
MD5 eeb4dcabdd8d4d43b1c23ab8f69720e6
BLAKE2b-256 7c48dcbee675d85a40cbc9dc8f2feb16cd2c590ea98985ac5e50666c2954421b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coloco-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: pdm/2.22.3 CPython/3.13.2 Linux/6.8.0-1021-azure

File hashes

Hashes for coloco-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 465575432233dfdd5582934ab6f2b1051f4d22c2ed23c1036a537358519832cd
MD5 2cb8f272f07169ca4880e5b81e77e9ab
BLAKE2b-256 ac5a3eb7d436dd5b2582e26d9e5c97a34f9f9297f8d24b35b331a650c9b1a6e0

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