Infrastructure as Constraints — write it once, scale it with a word.
Project description
Skaal
Infrastructure as Constraints for Python.
Build your app once, declare the behavior you need, and let Skaal choose the cheapest backend that satisfies it for local development, AWS, or GCP.
Python 3.11+ Z3 solver Local-first AWS GCP ASGI FastAPI Dash Blob storage Vector search Pulumi
Contents
- Why Skaal
- What You Get
- Quickstart
- How It Works
- Platform Features
- Installation
- Examples
- Documentation
- Project Status
- License
Why Skaal
Most frameworks force infrastructure decisions too early. Skaal reverses that model.
Instead of hard-coding SQLite, Redis, Postgres, S3, Firestore, or DynamoDB into business logic, you declare constraints such as latency, durability, throughput, access pattern, and scale. Skaal then plans an implementation that fits the target environment and catalog you provide.
That gives you a cleaner development story and a stronger deployment story:
- Start local without rewriting the application later.
- Keep infrastructure choices out of business code.
- Generate deployment artifacts instead of hand-maintaining them.
- Move between local, AWS, and GCP using the same application model.
- Let the solver pick the least expensive backend that still meets requirements.
What You Get
| Capability | What Skaal provides |
|---|---|
| Constraint-based planning | A Z3-backed solver that selects viable backends from TOML catalogs |
| Storage abstractions | Typed key-value, collection, blob, relational, and vector surfaces |
| Compute model | Decorators for compute, scale, handlers, schedules, and shared resources |
| Local runtime | ASGI serving, hot-reload workflow, local channels, and local backend support |
| Deployment pipeline | Generated Dockerfiles, entrypoints, Pulumi programs, and stack metadata |
| Cloud targets | AWS and GCP deployment flows driven from the same app definition |
| Extensibility | Plugin-based backend and channel registration via entry points |
Quickstart
Install Skaal for local development:
pip install "skaal[serve]"
skaal init demo
cd demo
pip install -e .
skaal run
If your app uses schedules, JWT auth, background jobs, or telemetry hooks, install runtime support too:
pip install "skaal[serve,runtime]"
Minimal example:
from skaal import App, Map
app = App("hello")
@app.storage(read_latency="< 10ms", durability="ephemeral")
class Counters(Map[str, int]):
pass
For HTTP APIs, Skaal's recommended pattern is to mount an ASGI framework and invoke Skaal compute from handlers. FastAPI, Starlette, and Dash fit well in that model.
How It Works
- Declare constraints with decorators such as
@storage,@compute,@blob, and@scale. - Plan infrastructure from a catalog using the Z3 solver.
- Build artifacts for the chosen target.
- Run locally or deploy to local, AWS, or GCP.
Typical flow:
skaal plan --app myapp:app --catalog catalogs/local.toml
skaal build --app myapp:app --target local --catalog catalogs/local.toml
skaal deploy --app myapp:app --target local --catalog catalogs/local.toml
Local deployment is Pulumi-based and produces artifacts such as a Dockerfile, main.py, Pulumi.yaml, and stack metadata under artifacts/.
Platform Features
Storage and Data
Map[K, V]andCollection[T]for typed application storage.BlobStorefor file and object workflows.- Relational and vector tiers for workloads that need SQL or embeddings.
- Backend catalogs for local, AWS, and GCP environments.
Runtime and App Model
- Composable
ModuleandAppabstractions. - Async-first runtime design.
- Local and Redis channel wiring.
- Scheduling primitives and runtime hooks.
- Optional mesh runtime via the
skaal-meshpackage.
Deployment
- Local target for Docker-backed development deployment.
- AWS and GCP packaging and deployment flows.
- Generated Pulumi programs instead of handwritten infrastructure glue.
- Target-specific dependency resolution through build settings in
pyproject.toml.
Framework Integration
- FastAPI support, including multipart uploads.
- Dash support for UI applications.
- Example apps covering CRUD APIs, streaming, uploads, dashboards, and counters.
Installation
Base install:
pip install skaal
Optional extras:
| Extra | Purpose |
|---|---|
skaal[serve] |
Local serving, hot reload, and ASGI/WSGI runtime support |
skaal[runtime] |
Schedules, JWT auth, OpenTelemetry hooks, and runtime services |
skaal[deploy] |
Docker and Pulumi deployment tooling |
skaal[aws] |
AWS provider and storage dependencies |
skaal[gcp] |
GCP provider and storage dependencies |
skaal[vector] |
Vector and embedding backend dependencies |
skaal[fastapi] |
FastAPI and multipart upload support |
skaal[dash] |
Dash and dash-bootstrap-components |
skaal[examples] |
Dependencies needed for bundled example apps |
skaal[mesh] |
Prebuilt distributed mesh runtime wheel |
skaal[secrets-aws] |
AWS secret manager integration |
skaal[secrets-gcp] |
GCP secret manager integration |
Common setups:
# Local development
pip install "skaal[serve,runtime]"
# AWS deployment
pip install "skaal[deploy,aws,runtime]"
# GCP deployment
pip install "skaal[deploy,gcp,runtime]"
Examples
The repository includes runnable examples for common application shapes:
- Hello world
- Todo API
- FastAPI streaming
- File upload API
- Dash app
- Mesh counter
- Task dashboard
- Team directory
Start by browsing examples and the generated local deployment output in artifacts.
Documentation
Project Status
Skaal is currently alpha. The core direction is stable: constraint declaration, backend planning, generated deployment artifacts, and local or cloud execution from one codebase. Expect API refinement as the storage, runtime, deploy, and mesh surfaces continue to mature.
License
GPL-3.0-or-later
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skaal-0.3.2.tar.gz.
File metadata
- Download URL: skaal-0.3.2.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
433ca68199d859760c71501edca71a86bea8282e4fbd53d7a590972b37ace828
|
|
| MD5 |
7a027b39e6cec59adfe55e86fcdc54b3
|
|
| BLAKE2b-256 |
760d4102013aa21b915ff34918d67392894b3825f9c2a6b51cb4433297d1c74d
|
Provenance
The following attestation bundles were made for skaal-0.3.2.tar.gz:
Publisher:
release.yml on Elouen-ginat/Skaal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skaal-0.3.2.tar.gz -
Subject digest:
433ca68199d859760c71501edca71a86bea8282e4fbd53d7a590972b37ace828 - Sigstore transparency entry: 1449751136
- Sigstore integration time:
-
Permalink:
Elouen-ginat/Skaal@d79f644255374d755dbd729975e50c0e028547f1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Elouen-ginat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d79f644255374d755dbd729975e50c0e028547f1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file skaal-0.3.2-py3-none-any.whl.
File metadata
- Download URL: skaal-0.3.2-py3-none-any.whl
- Upload date:
- Size: 338.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
594917755f4fd08f84fd64995991e06722b1b0268d6c7609190db7a0018e74b2
|
|
| MD5 |
87daeec1e59ebc973c3e6d04169ac72a
|
|
| BLAKE2b-256 |
720b15a20d6f66c3f90ee37789c5e0e80357b38a19fcaa78e7c006408781c284
|
Provenance
The following attestation bundles were made for skaal-0.3.2-py3-none-any.whl:
Publisher:
release.yml on Elouen-ginat/Skaal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skaal-0.3.2-py3-none-any.whl -
Subject digest:
594917755f4fd08f84fd64995991e06722b1b0268d6c7609190db7a0018e74b2 - Sigstore transparency entry: 1449751153
- Sigstore integration time:
-
Permalink:
Elouen-ginat/Skaal@d79f644255374d755dbd729975e50c0e028547f1 -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/Elouen-ginat
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d79f644255374d755dbd729975e50c0e028547f1 -
Trigger Event:
workflow_dispatch
-
Statement type: