Skip to main content

scalo

The runtime layer for Python control-plane services: config, logging, metrics, health, secrets and a service CLI. It comes wired together: subclass one class and your service reads its config, logs in the right format for where it runs, and serves its health probes.

It is built for APIs, orchestrators, CLI tools and integration glue. For the hot path there is a Rust sister library, scalo-rs, with the same conventions and a different API.

What it gives you

  • A seven-layer config cascade, from CLI flags and env vars down to YAML and defaults, that reads the same in a laptop shell and a Kubernetes pod.
  • Structured logs, JSON in a container and readable text at a terminal. Credentials, tokens and keys are masked, and so are cards, IBANs, emails and phone numbers, and Australian ABN, ACN, TFN and Medicare numbers where a keyword names them. TRACE records skip the scrubber by default.
  • ServiceApp: subclass it and get run, version, config-check and generate-artefacts, with config and logging started for you, and metrics as well once scalo[metrics] is installed.
  • /livez and /readyz on an observability port kept apart from your application's port.
  • With the metrics extra, Prometheus and OpenTelemetry metrics, process and container gauges included, scraped from /metrics on the same port. Without a metrics manager that path answers 404.
  • Secrets from OpenBao or Vault, AWS, GCP, Azure, and Kubernetes, one extra per backend.
  • A deployment contract: return one from deployment_contract() and generate-artefacts writes your runtime Dockerfile and the contract the scalo-service Helm chart renders from.
  • Kafka, CEL expressions and an HTTP client with jittered retry, each behind a separate extra.

Example

uv add scalo
from scalo.cli import ServiceApp, VersionInfo
from scalo.logger import logger

class Greeter(ServiceApp):
    name = "greeter"
    env_prefix = "GREETER"

    def version_info(self) -> VersionInfo:
        return VersionInfo(self.name, "1.0.0")

    def run_service(self, config) -> None:
        logger.info("hello", target=config.get("target", "world"))

if __name__ == "__main__":
    Greeter().cli()

GREETER_TARGET=team python greeter.py run logs hello with target=team, and python greeter.py config-check validates the config without starting anything.

Extras

Extra Adds
api FastAPI conventions: operation ids, ETag and If-Match, problem+json errors, pagination
cli A whole CLI generated from an OpenAPI spec
mcp MCP tools generated from a scalo.api app's spec, served on the same app
http An httpx client with jittered retry
metrics Prometheus and OTLP export, process and container gauges
opentelemetry The four OpenTelemetry packages of metrics
expression CEL expressions
kafka Produce, consume and schema inference
deployment The deployment contract and its Dockerfile and manifest generators
secrets-vault, secrets-aws, secrets-gcp, secrets-azure, secrets-kubernetes One secrets backend each
secrets Every secrets backend

Pick the secrets backend you use rather than secrets, since the AWS, GCP and Azure backends each bring a cloud SDK.

Docs and source are at https://github.com/hyperi-io/scalo-py. Needs the Python version that requires-python sets in pyproject.toml. Licensed Apache-2.0: https://github.com/hyperi-io/scalo-py/blob/main/LICENSE.

Metadata

Release files for scalo 2.32.15

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

Source distribution (sdist)

Source distribution for scalo 2.32.15
File Size Uploaded Provenance Actions
scalo-2.32.15.tar.gz 468.1 kB Without provenance Details for scalo-2.32.15.tar.gz

Built distribution (wheel)

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

Total release size: 1.0 MB

Release files / scalo-2.32.15.tar.gz

Download URL scalo-2.32.15.tar.gz
Size 468.1 kB
Tags Source
SHA-256 checksum
How to use checksums
744b922052a2992bdd73a3ac7663b1b263595d7a3fedd5324cb8e0f2fa7c4a7b
BLAKE2b-256 checksum
How to use checksums
c49a03940a53cb56737c728c80ff1f118df11025c8280394713eb47f93dd8af1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / scalo-2.32.15-py3-none-any.whl

Download URL scalo-2.32.15-py3-none-any.whl
Size 552.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a8f50408e9c15f64da0d2e22b0d31ea86751919f8c0cea91333afc2e2e08d2e
BLAKE2b-256 checksum
How to use checksums
49e51e0a5b8721f46754612601e0f7b7ef55cc26ec978450ac21ff01ca72051e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for scalo 2.32.15

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

2.32.15 This release

2 release files No provenance

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