Skip to main content

scalio-platform

Shared building blocks of the Scalio apps (Nexus, Compass, Citadel, Foundry, Rosetta, Pulse, Beacon, Cockpit, ID, Monitor). Before this package each app kept its own copy of these files (architecture review C2/C4, ADR 0058 in scalio-docs). Nothing in this package is secret.

Module What it does
scalio_platform.job_lease Runs a background loop on one instance at a time (lease in db.job_leases). During an update two instances run side by side; without the lease both would act.
scalio_platform.migrations Schema migrations for MongoDB: ordered steps, each applied once, version in db.meta (schema_version).
scalio_platform.health The answer of GET /api/health that Scalio Monitor reads (ok / degraded / down, leases of the loops).
scalio_platform.error_report Sends unexpected errors to Scalio Monitor, only when ERROR_REPORT_URL and ERROR_REPORT_TOKEN are set.
scalio_platform.app_links Links and features of the product switcher (SCALIO_APP_LINKS, SCALIO_STAGE, SAAS_MODE).
scalio_platform.roles Permission catalog of the app, built-in and own roles (app_roles), require_perm for routes, shared role API (roles_router) for RoleAdmin in scalio-ui.
scalio_platform.tenant_jobs Runs one job per tenant side by side (for_each_tenant): at most TENANT_JOBS_PARALLEL at once (default 4), a time budget per tenant (TENANT_JOBS_TIMEOUT, default 900 s), a failing tenant never stops the others; for MSP instances with many customers (ADR 0063 mandant/M11).
scalio_platform.setup_wizard State of the Einrichtungsassistent (GET/PUT /api/setup/wizard, ADR 0060): wizard_state, save_wizard, parse_update.

Use in an app

scalio-platform==0.1.0            # backend/requirements.txt, exact version
from scalio_platform import error_report, health, job_lease
from scalio_platform.migrations import BASELINE, run_migrations

MIGRATIONS = BASELINE                      # append (2, migrate_002_...) and so on, never edit past steps

async def startup():
    await run_migrations(db, MIGRATIONS)   # before the background loops
    for name, loop in LOOPS.items():
        asyncio.create_task(job_lease.run_exclusive(db, name, loop))

error_report.install(app, "citadel", build_info)
code, body = await health.health_report(db, build_info(), lease_jobs=sorted(LOOPS))

A migration step must be safe to run twice: two instances can start at the same moment.

Develop and release

  • pip install -e ".[dev]", then pytest -q and ruff check . (both run in CI).
  • Release: bump pyproject.toml and __version__, run python3 tools/changelog.py release <version> (moves changelog.d/ into CHANGELOG.md), merge, then «Freigeben» in the Scalio Cockpit (workflow publish.yml: PyPI with trusted publishing, tag and GitHub release). Tags without v.
  • A change of behaviour changes every app on its next upgrade: say so in the PR and the CHANGELOG.

Metadata

Release files for scalio-platform 0.4.0

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

Source distribution (sdist)

Source distribution for scalio-platform 0.4.0
File Size Uploaded Provenance Actions
scalio_platform-0.4.0.tar.gz 28.4 kB With provenance Details for scalio_platform-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scalio-platform 0.4.0
File Interpreter ABI Platform Actions
scalio_platform-0.4.0-py3-none-any.whl Python 3 none any Details for scalio_platform-0.4.0-py3-none-any.whl

Total release size: 49.5 kB

Release files / scalio_platform-0.4.0.tar.gz

Download URL scalio_platform-0.4.0.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
688f7121e4171cdd4904498e76a034619e3f92c1a545ad1fcf8e54922673b463
BLAKE2b-256 checksum
How to use checksums
089e9755307006050f6bf5331a025acb383bfbab41b9c3917068cc4fcb2ba80a
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 1, 2026.

Transparency log

Release files / scalio_platform-0.4.0-py3-none-any.whl

Download URL scalio_platform-0.4.0-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8082b15bd664f0567356c58d95501a5c87cb949fdeb437b8cb65994fd0c02cb
BLAKE2b-256 checksum
How to use checksums
bd75600ae445f971510605957c7d608608b688c2bdb9b34b76a08ed5b669d1d7
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 1, 2026.

Transparency log

Security for scalio-platform 0.4.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scalio_platform-0.4.0.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 1, 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