Skip to main content
Pre-release

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

Elementary Runtime

Early development.

Elementary Runtime is a small service that customers run in their own environment. It uses local warehouse credentials to execute SQL prepared by Elementary Cloud, so Cloud never holds credentials that can read customer business tables.

Warehouse drivers will be optional extras. Installing the base package for task models will not pull in every warehouse driver or the full runtime.

A license has not been chosen yet.

Security-critical code

Local safety controls live under src/elementary_runtime/execution/. That tree is the audited surface: SQL validation, query execution with limits applied while rows are fetched and encoded, and redaction of SQL, row values, credentials, and unrestricted warehouse errors from logs and telemetry.

Repository layout

src/elementary_runtime/
  protocol/      Task and result wire formats
  config/        Versioned YAML configuration and local limits
  common/        Shared helpers used by protocol and config
  warehouses/    Warehouse clients (drivers behind extras)
  execution/     Audited local safety controls
    sql/         SQL validation
    worker/      Worker pool, query execution, limit enforcement
    redaction/   Error, log, and telemetry scrubbing
  coordinator/   Register, task streams, heartbeat, submit, retries, shutdown
  cli/           Process entrypoint: commands, instance id, logging

Configuration

version: 1
cloud:
  token_file: /run/secrets/elementary_runtime_token
connections:
  - warehouse_connection_id: connection-id
    type: snowflake
    account: ab12345.eu-central-1
    user: elementary_runtime
    password_file: /run/secrets/snowflake_password
    role: ELEMENTARY_RUNTIME
    warehouse: ELEMENTARY_WH
    database: ANALYTICS

Running

elementary-runtime loads the YAML configuration and runs until it is stopped.

elementary-runtime run --config /etc/elementary-runtime/config.yml
elementary-runtime validate --config /etc/elementary-runtime/config.yml
elementary-runtime validate --check-connections --config /etc/elementary-runtime/config.yml
elementary-runtime --version

A container can start with no arguments. Each flag falls back to an environment variable:

  • ELEMENTARY_RUNTIME_CONFIG: configuration file, default /etc/elementary-runtime/config.yml
  • ELEMENTARY_RUNTIME_INSTANCE_ID: explicit instance id, unset by default
  • ELEMENTARY_RUNTIME_LOG_LEVEL: root log level, default INFO
  • ELEMENTARY_RUNTIME_POD_UID: Helm pod UID from the Downward API
  • ELEMENTARY_RUNTIME_POD_NAME: pod name, used as the display name when the config has none

The instance id is the first match:

  1. --instance-id or ELEMENTARY_RUNTIME_INSTANCE_ID, used as given.
  2. helm:<pod uid> when ELEMENTARY_RUNTIME_POD_UID is set. instance.id_prefix is not applied, because a pod UID is already unique.
  3. docker:<hostname> when /.dockerenv or /run/.containerenv exists, otherwise host:<hostname>. instance.id_prefix is prepended when set, for example eu-prod:docker:runtime-1.

Docker assigns a new hostname when a container is recreated. Set one explicitly (docker run --hostname or Compose hostname) so the instance id stays stable, and keep it unique among replicas.

Exit codes:

  • 0: stopped gracefully
  • 1: runtime failure, such as Cloud rejecting the token
  • 2: usage or configuration error
  • 3: drain timed out with work still in flight

The first SIGTERM or SIGINT drains in-flight work for 30 seconds. A second signal exits immediately. Set the container stop grace period above that drain (docker stop -t, or Compose stop_grace_period), for example 45 seconds.

Docker images

Published images live at ghcr.io/elementary-data/elementary-runtime and are built for linux/amd64 and linux/arm64.

Tag Drivers
{version} All of them
latest All of them, stable releases only
core-{version} None
core None, stable releases only
{driver}-{version} snowflake, databricks, postgres, or redshift
{driver} That driver, stable releases only

A pre-release such as 0.1.0rc3 is tagged with its version only. It does not move latest, core, or the bare driver tags.

docker run --rm \
  --hostname runtime-1 \
  --stop-timeout 45 \
  -v /path/to/config.yml:/etc/elementary-runtime/config.yml:ro \
  ghcr.io/elementary-data/elementary-runtime:{version}

The image runs elementary-runtime run. Mount the configuration where the process expects it, set --hostname so the instance id stays stable, and keep the stop timeout above the 30 second drain.

Development

Requires uv and Python 3.11–3.14. Local development uses Python 3.12.

After a clone or a new Git worktree, install the environment and hooks:

./script/setup.sh

Then:

uv run pytest
uv run mypy src tests
uvx prek run --all-files

The package version lives in pyproject.toml. At runtime, elementary_runtime.__version__ is read from the installed distribution metadata.

Releasing

Run the Prepare release workflow from the Actions tab. Choose a bump (patch, minor, major, rc, stable, patch-rc, minor-rc, or major-rc) or set an explicit version. minor-rc turns 0.1.0 into 0.2.0rc1. rc advances an existing candidate. It opens a pull request that updates pyproject.toml and uv.lock.

Merging that pull request publishes the package to PyPI and the container images, then tags v{version} and creates a GitHub Release. Pre-releases do not move floating image tags.

If publishing fails before that tag exists, re-run the Release package workflow from main. A version that already has a tag is skipped.

Metadata

Release files for elementary-runtime 0.1.0rc9

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

Source distribution (sdist)

Source distribution for elementary-runtime 0.1.0rc9
File Size Uploaded Provenance Actions
elementary_runtime-0.1.0rc9.tar.gz 243.7 kB Without provenance Details for elementary_runtime-0.1.0rc9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for elementary-runtime 0.1.0rc9
File Interpreter ABI Platform Actions
elementary_runtime-0.1.0rc9-py3-none-any.whl Python 3 none any Details for elementary_runtime-0.1.0rc9-py3-none-any.whl

Total release size: 338.8 kB

Release files / elementary_runtime-0.1.0rc9.tar.gz

Download URL elementary_runtime-0.1.0rc9.tar.gz
Size 243.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e6a52d3b89ec8df775f1258cb12ce79db29a970bef4726827cd84a5ff8d32d94
BLAKE2b-256 checksum
How to use checksums
570861ff7672a0ed92d91124d848cc6ec4624a85b6c7bb7d8c9719805ca3acc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
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 / elementary_runtime-0.1.0rc9-py3-none-any.whl

Download URL elementary_runtime-0.1.0rc9-py3-none-any.whl
Size 95.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a7228a9f77a5386e03f6a3d677a7d77d5ce29cffc1671b872583e1bc6ce5f04
BLAKE2b-256 checksum
How to use checksums
0e18be7e368ffaa563330a46fcc809fbc6830f672be6cee938c4b7bb13850ae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
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 elementary-runtime 0.1.0rc9

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.

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