Metadata-Version: 2.4
Name: sillo-framework
Version: 0.0.1a1
Summary: An async Python web framework for serious APIs, web applications, real-time systems, and business backends.
Author-email: Chidebele Dunamis <techwithdunamix@gmail.com>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: API,ASGI,HTTP,Python,async,asynchronous,backend,concurrent,framework,real-time,scalable,uvicorn,web,web server,websocket
Requires-Python: >=3.10
Requires-Dist: anyio==4.14.1
Requires-Dist: itsdangerous>=2.1.2
Requires-Dist: passlib>=1.7.4
Requires-Dist: pydantic<3.0,>=2.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: typing-extensions>=4.12.2; python_version < '3.10'
Requires-Dist: uvicorn>=0.27.0
Provides-Extra: all
Requires-Dist: aerich>=0.7.0; extra == 'all'
Requires-Dist: argon2-cffi>=21.2.0; extra == 'all'
Requires-Dist: bcrypt>=4.0.0; extra == 'all'
Requires-Dist: click>=8.1.3; extra == 'all'
Requires-Dist: cryptography>=41.0.0; extra == 'all'
Requires-Dist: email-validator>=2.0.0; extra == 'all'
Requires-Dist: granian>=1.2.0; extra == 'all'
Requires-Dist: jinja2>=3.1.6; extra == 'all'
Requires-Dist: pyjwt>=2.7.0; extra == 'all'
Requires-Dist: python-ulid>=2.0.0; extra == 'all'
Requires-Dist: redis>=5.0.0; extra == 'all'
Requires-Dist: scrypt>=0.8.0; extra == 'all'
Requires-Dist: strawberry-graphql>=0.219.0; extra == 'all'
Requires-Dist: tabulate>=0.9.0; extra == 'all'
Requires-Dist: tortoise-orm>=0.20.0; extra == 'all'
Provides-Extra: cache
Requires-Dist: redis>=5.0.0; extra == 'cache'
Provides-Extra: cli
Requires-Dist: click>=8.1.3; extra == 'cli'
Requires-Dist: tabulate>=0.9.0; extra == 'cli'
Provides-Extra: dev
Requires-Dist: aerich>=0.7.0; extra == 'dev'
Requires-Dist: argon2-cffi>=21.2.0; extra == 'dev'
Requires-Dist: bcrypt>=4.0.0; extra == 'dev'
Requires-Dist: click>=8.1.3; extra == 'dev'
Requires-Dist: coverage<8.0,>=6.3; extra == 'dev'
Requires-Dist: cryptography>=41.0.0; extra == 'dev'
Requires-Dist: email-validator>=2.0.0; extra == 'dev'
Requires-Dist: exceptiongroup>=1.2.0; (python_version < '3.11') and extra == 'dev'
Requires-Dist: granian>=1.2.0; extra == 'dev'
Requires-Dist: httpx<0.29.0,>=0.23.3; extra == 'dev'
Requires-Dist: jinja2>=3.1.6; extra == 'dev'
Requires-Dist: mypy>=1.15.0; extra == 'dev'
Requires-Dist: pyjwt>=2.7.0; extra == 'dev'
Requires-Dist: pytest-asyncio<1.5.0,>=0.25.3; extra == 'dev'
Requires-Dist: pytest<9.1.0,>=8.3.4; extra == 'dev'
Requires-Dist: python-ulid>=2.0.0; extra == 'dev'
Requires-Dist: redis>=5.0.0; extra == 'dev'
Requires-Dist: ruff>=0.0.256; extra == 'dev'
Requires-Dist: scrypt>=0.8.0; extra == 'dev'
Requires-Dist: strawberry-graphql>=0.219.0; extra == 'dev'
Requires-Dist: tabulate>=0.9.0; extra == 'dev'
Requires-Dist: tortoise-orm>=0.20.0; extra == 'dev'
Requires-Dist: ty>=0.0.29; extra == 'dev'
Requires-Dist: typing-extensions==4.16.0; extra == 'dev'
Provides-Extra: events
Requires-Dist: redis>=5.0.0; extra == 'events'
Provides-Extra: granian
Requires-Dist: granian>=1.2.0; extra == 'granian'
Provides-Extra: graphql
Requires-Dist: strawberry-graphql>=0.219.0; extra == 'graphql'
Provides-Extra: hashing-all
Requires-Dist: argon2-cffi>=21.2.0; extra == 'hashing-all'
Requires-Dist: bcrypt>=4.0.0; extra == 'hashing-all'
Requires-Dist: scrypt>=0.8.0; extra == 'hashing-all'
Provides-Extra: hashing-argon2
Requires-Dist: argon2-cffi>=21.2.0; extra == 'hashing-argon2'
Provides-Extra: hashing-bcrypt
Requires-Dist: bcrypt>=4.0.0; extra == 'hashing-bcrypt'
Provides-Extra: hashing-scrypt
Requires-Dist: scrypt>=0.8.0; extra == 'hashing-scrypt'
Provides-Extra: jwt
Requires-Dist: pyjwt>=2.7.0; extra == 'jwt'
Provides-Extra: record
Requires-Dist: tortoise-orm>=0.20.0; extra == 'record'
Provides-Extra: templating
Requires-Dist: jinja2>=3.1.6; extra == 'templating'
Description-Content-Type: text/markdown

# Sillo

<p align="center">
  <img src="https://avatars.githubusercontent.com/u/199959103?s=400&u=2b9d0cb939318b295fefd0cdbc417f85d5d4ba87&v=4" alt="Sillo logo" width="160" height="160">
</p>

<p align="center">
  <strong>Build serious Python backends with one coherent application model.</strong>
</p>

Sillo is an async Python web framework for building APIs, web applications, real-time systems, and business backends. It focuses on practical enterprise application work: routing, request validation, dependency injection, middleware, sessions, authentication helpers, records, background work, WebSockets, OpenAPI, testing, and operational structure.

Sillo is the open framework layer of a larger platform vision: a cohesive developer ecosystem for creating, operating, and scaling serious software without stitching together unrelated tools for every project.

## Status

Sillo is preparing for its first alpha release: `0.0.1a1`.

Use it for exploration, prototypes, early applications, and feedback. APIs may still change before a stable release.

## Requirements

- Python 3.10+
- `uv` for project and dependency management

## Installation

```bash
uv add sillo
```

For optional feature groups:

```bash
uv add "sillo[cli]"
uv add "sillo[templating]"
uv add "sillo[jwt]"
uv add "sillo[cache]"
uv add "sillo[record]"
uv add "sillo[graphql]"
```

For a full development setup:

```bash
uv add "sillo[all]"
```

## Hello World

```python
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:

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

## Request Validation

Sillo validates request bodies with Pydantic through `request_model`.

```python
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.

```python
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:

```python
from sillo import Depend


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

## Routing

```python
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
- Test client utilities
- CLI for running and inspecting applications

## Platform Direction

Sillo Core is intended to become the technical foundation for a broader enterprise developer platform:

- **Miko**: visual admin studio for records, workflows, and internal operations
- **Zoro**: managed deployment for Sillo applications
- **Koda**: server management and deployment automation for customer-controlled infrastructure
- **Nira**: authentication, organisations, access control, and identity services
- **Piko**: logs, queues, jobs, releases, health, and application monitoring
- **Template and integration marketplaces**: reusable application foundations and verified integrations

The open-source framework should remain useful on its own. Commercial products should remove operational work, not lock normal application development behind a paywall.

## Documentation

The documentation source lives in `docs/docs`.

Build it locally with:

```bash
cd docs/docs
bun run build
```

## Testing

Run the core test suite with:

```bash
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
