Skip to main content

A kit for creating FastAPI + Svelte applications

Project description

Coloco

A kit for creating FastAPI + Svelte applications focusing on locality of code and decreased boilerplate. Create simple full-stack apps with built-in codegen. Deploy with a package that can be hosted with python or a docker container.

File-based routing for your front-end and back-end. Expose API endpoints with docs via fastapi. Generate a front-end with svelte.

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 results = test({ query: { name: "DoItLive" } });
</script>

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

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

Opinions

This framework is opinionated and combines the following tools/concepts:

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

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.1.tar.gz (10.5 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.1-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coloco-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 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.1.tar.gz
Algorithm Hash digest
SHA256 c27d079609ff65c327060dda6c8043d90c5fe5a7974e75eadc5ac783e35c4e85
MD5 8e96137a03496b9b1a4a10083744587c
BLAKE2b-256 c3c1d9e3f1c19157e1a3bdc94e553fea4804032d24cb87a544cc7174403d7cdf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coloco-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb9cd9841c2adfcdd2c57d3890750b105bd576ed3e9b34958eb8d149871c281
MD5 0ab6970bdb0fdbe67c0393d82b8f986d
BLAKE2b-256 6058722f9ab274446ef59b011000844f6aeda8e94b954635f313165a1e63aaf4

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