Skip to main content
Pre-release

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

Sillo

Sillo logo

Build serious Python backends with one coherent application model.

Sillo is an async Python web framework for building APIs, web applications, real-time systems, and business backends. Routing, request validation, dependency injection, middleware, sessions, authentication, records, background work, WebSockets, OpenAPI, and testing are first-party modules that share one configuration model.

The pitch is coherence, not breadth. One auth= declaration gates a route and writes its securityScheme into the OpenAPI spec. The queue and the scheduler start with the application lifecycle. Range requests, ETags, and content negotiation are middleware rather than something each project rewrites.

Requirements

  • Python 3.10+
  • uv for project and dependency management

Installation

uv add sillo-framework

For optional feature groups:

uv add "sillo-framework[templating]"
uv add "sillo-framework[jwt]"
uv add "sillo-framework[cache]"
uv add "sillo-framework[record]"
uv add "sillo-framework[graphql]"

For a full development setup:

uv add "sillo-framework[all]"

Hello World

from sillo import SilloApp

app = SilloApp(title="My API")


@app.get("/")
async def home(request, response):
    return response.json({"message": "Hello from Sillo"})

Run it with an ASGI server:

uv add uvicorn
uv run uvicorn main:app --reload

Request Validation

Sillo validates request bodies with Pydantic through request_model.

from pydantic import BaseModel
from sillo import SilloApp

app = SilloApp()


class CreateUser(BaseModel):
    name: str
    email: str


@app.post("/users", request_model=CreateUser)
async def create_user(request, response, user: CreateUser):
    return response.json(user.model_dump(), status_code=201)

The validated model is also available as request.validated_data.

Dependency Injection

Use Depend to inject request-scoped dependencies into handlers.

from sillo import Depend, SilloApp

app = SilloApp()


async def get_current_user():
    return {"id": "user_1", "name": "Ada"}


@app.get("/me")
async def me(request, response, user=Depend(get_current_user)):
    return response.json(user)

When a dependency needs the current request:

from sillo import Depend


def auth_header(request=Depend(get_request=True)):
    return request.headers.get("Authorization")

Routing

from sillo import Router, SilloApp

app = SilloApp()
api = Router(prefix="/api")


@api.get("/users/{user_id:int}")
async def get_user(request, response, user_id: int):
    return response.json({"id": user_id})


app.mount_router(api)

What Sillo Provides

  • Async ASGI application core
  • HTTP routing, route groups, and mounted routers
  • Request and response helpers
  • Pydantic request validation
  • Dependency injection with nested dependencies
  • Query, header, and cookie parameter helpers
  • Middleware pipeline
  • CORS and CSRF support
  • Sessions and authentication utilities
  • API keys, JWT helpers, users, permissions, and guards
  • OpenAPI generation and interactive docs
  • File uploads, streaming responses, static files, and frontend fallback serving
  • WebSockets, consumers, channels, groups, events, and history helpers
  • Cache abstraction with memory and Redis support
  • Event system and background work primitives
  • Record layer for database-backed models, transactions, scopes, casting, and pagination
  • Mail service utilities
  • Sync and async test clients
  • Model admin at /admin/ that authenticates against your own user model
  • sillo command, and sillo.console for building a project's own

Scope And Boundaries

Sillo runs on its own. No hosted service is required to put an application into production.

The framework is opinionated at the defaults and open at the boundaries. Auth backends, middleware, cache drivers, session stores, and hashing algorithms are contracts you can implement yourself, and anything the framework does on your behalf is something you can read, override, or replace.

Sillo ships a sillo command with the framework-level operations, built on sillo.console. Inside a project it also merges in whatever that project's console.py registers, so sillo db:migrate works without the framework owning the command set. The operations underneath stay plain functions in sillo.record.commands, sillo.users.commands and sillo.work.commands, so a project that wants different names writes its own console against them.

Documentation

The documentation source lives in docs/docs.

Build it locally with:

cd docs/docs
bun run build

Testing

Run the core test suite with:

python3 -m pytest -q

Some optional integrations require their extras to be installed before their tests can run.

Release Principles

Sillo prioritizes:

  • clear APIs and useful error messages
  • strong defaults with replaceable internals
  • production-oriented documentation
  • compatibility, migration guidance, and honest release notes
  • security and reliability before broad platform expansion

License

BSD-3-Clause

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sillo_framework-0.0.2a1.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sillo_framework-0.0.2a1-py3-none-any.whl (899.9 kB view details)

Uploaded Python 3

File details

Details for the file sillo_framework-0.0.2a1.tar.gz.

File metadata

  • Download URL: sillo_framework-0.0.2a1.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sillo_framework-0.0.2a1.tar.gz
Algorithm Hash digest
SHA256 c2b5ff9fd2ac2cfc34b105b40a700ef5f95d89d7a65437f39fd3c93de40f9989
MD5 97311147fbe871b54442abd837d70d88
BLAKE2b-256 30b31e9166721aca5c2509e7413a8cb79169d346551a3536edac4a1a5cb9daf4

See more details on using hashes here.

File details

Details for the file sillo_framework-0.0.2a1-py3-none-any.whl.

File metadata

  • Download URL: sillo_framework-0.0.2a1-py3-none-any.whl
  • Upload date:
  • Size: 899.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sillo_framework-0.0.2a1-py3-none-any.whl
Algorithm Hash digest
SHA256 59775d015c1aafdd368ad4ce95c1576536cda6eaa4c8f7b7f24ef14051b4405b
MD5 3bf04dbaeceb99d63e6f150535d3fa24
BLAKE2b-256 05732fadd6b00e83be88715893f08481f569345f9bf14727db39990932a02e74

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 Sentry Error logging StatusPage Status page