Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Chano

A Python framework for seamless serverless usage

Design

A serverless-first Python web framework. Its handler API follows the shape FastAPI made familiar (typed signatures, typed models, Depends, generated OpenAPI) but is built from the ground up around one-function-per-route deployments. Has native support for Vercel's Build Outputs API.

Usage

Routes live in an app/ directory, laid out like the Next.js App Router. Each route.py exports functions named after HTTP methods:

app/route.py                      ->  /
app/api/hello/route.py            ->  /api/hello
app/api/items/[item_id]/route.py  ->  /api/items/{item_id}
app/files/[...path]/route.py      ->  /files/{path:path}
app/(group)/about/route.py        ->  /about
public/                           ->  static files
# app/api/items/[item_id]/route.py
from typing import Annotated

from chano import Depends, HTTPBearer, HTTPException, raises
from msgspec import Meta, Struct


class Item(Struct):
    name: str
    price: Annotated[float, Meta(gt=0)]


bearer = HTTPBearer()


@raises(401, "Not authenticated")
def current_user(token: str = Depends(bearer)) -> str:
    if token != "secret":
        raise HTTPException(401, "Not authenticated")
    return "scott"


def GET(item_id: int, verbose: bool = False):
    return {"item_id": item_id, "verbose": verbose}


async def PUT(item_id: int, item: Item, user: str = Depends(current_user)) -> Item:
    return item

A handler's signature declares its inputs, which are validated with msgspec (invalid requests get a 422):

  • a parameter named after a [segment] comes from the path
  • a model (a msgspec Struct, dataclass or attrs class) comes from the JSON body, decoded and validated in a single pass
  • Depends(fn) is the result of calling fn, whose own signature is resolved the same way
  • a Request annotation receives the raw request
  • anything else is a query parameter; Query(), Header() and Body() override the default

Depends(HTTPBearer()) returns the token from Authorization: Bearer <token> (or responds 401) and documents an HTTP bearer security scheme in openapi.json. @raises(401, "Not authenticated") on a handler or dependency documents an error response for every operation using it.

Handlers can be sync or async, and return JSON-serializable data or a Response.

chano dev      # local server with reload
chano build    # writes .vercel/output (Build Output API v3)
vercel deploy --prebuilt

chano build deploys each route.py as its own function, so routes scale, cold-start and are configured independently. A route can set per-function options as module-level values, like Next.js route segment config:

max_duration = 30  # seconds
memory = 1024  # MB
regions = ["iad1"]

Framework features that assume one long-lived app are adapted to this model rather than run inside a function. The API docs are the first example: the OpenAPI schema and Swagger UI are rendered at build time and served as static files at /openapi.json and /docs, straight from the CDN.

Dependencies are resolved from the project's pyproject.toml with uv and vendored into every function; public/ is served as static files. Add chano[dev] to [dependency-groups].dev for chano dev so uvicorn is available locally without being vendored into built functions. See examples/hello.

Development

Tooling is uv, ruff and ty:

uv sync                 # install dependencies
uv run pytest           # tests
uv run ruff format .    # format
uv run ruff check .     # lint
uv run ty check         # type check

Metadata

Release files for chano 1.0.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chano 1.0.0a1
File Size Uploaded Provenance Actions
chano-1.0.0a1.tar.gz 221.6 kB With provenance Details for chano-1.0.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chano 1.0.0a1
File Interpreter ABI Platform Actions
chano-1.0.0a1-py3-none-any.whl Python 3 none any Details for chano-1.0.0a1-py3-none-any.whl

Total release size: 272.0 kB

Release files / chano-1.0.0a1.tar.gz

Download URL chano-1.0.0a1.tar.gz
Size 221.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6881ae2118ee16f9f1c9544e65258fafcdc9c305bb0b6f95df36f75811fde3d5
BLAKE2b-256 checksum
How to use checksums
85dcfe1e8f3c2d4999f4347802624bb2533a063a99fc15796c5d5561c333375b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / chano-1.0.0a1-py3-none-any.whl

Download URL chano-1.0.0a1-py3-none-any.whl
Size 50.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4379b7966f4fc25c27b338cf1c10dea7120a6b3a191f8702508a4d69fd28b6cd
BLAKE2b-256 checksum
How to use checksums
9a0cb29d2c3bdaacc8444622a56fabae3bd43f73483297558f8c5a0405b99a55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for chano 1.0.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for chano-1.0.0a1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page