Skip to main content

Turbine

Contract-driven data quality for data products.

PyPI Python ODCS

Turbine turns a YAML data contract into running quality checks. You declare a table's schema, ownership, freshness expectations, and validity rules in one file; Turbine validates the YAML offline, checks the live database matches it, runs every quality check against the data, scores the result, and exposes everything over a REST API and dashboard.

It uses ODCS v3.1.0, so contracts round-trip with the rest of the data ecosystem.

Example

A contract is a single YAML file:

kind: DataContract
apiVersion: v3.1.0
id: orders
name: Orders
domain: sales
version: "1.0.0"
status: active

description:
  purpose: Order records used for billing and fulfilment.
  usage: Join to customers on customer_id.

slaProperties:
  - property: latency
    element: orders.created_at
    value: 24
    unit: hour

schema:
  - name: orders
    description: One row per order.
    properties:
      - name: order_id
        logicalType: integer
        required: true
        primaryKey: true
      - name: amount
        logicalType: number
        required: true
      - name: status
        logicalType: string
        required: true
      - name: created_at
        logicalType: timestamp
        required: true

servers:
  - server: default
    type: duckdb
    database: data/orders.duckdb
    schema: main

team:
  members:
    - username: sales-owner
      name: Sales Data Team
      role: Data Product Owner
support:
  - channel: Data support
    tool: slack
    scope: issues
    url: https://example.test/data-support
customProperties:
  - property: availabilityClassification
    value: B1
  - property: integrityClassification
    value: I2
  - property: confidentialityClassification
    value: V2
  - property: privacyClassification
    value: P1

Run every check on it:

turbine check contracts/orders.yml --datasource default

You get a per-check verdict, a quality score per dimension (completeness, accuracy, consistency, timeliness, validity), and the failing rows persisted for follow-up.

Installation

Start a new Python project, then add the backend you use:

uv init --python 3.13
uv add "turbine-data[duckdb]"        # local files, zero credentials
# uv add "turbine-data[postgres]"    # PostgreSQL
# uv add "turbine-data[snowflake]"   # Snowflake
# uv add "turbine-data[all]"         # every driver + dashboard

In an existing Python project, skip uv init and run the matching uv add command.

Requires Python 3.12 or newer. The PyPI package is turbine-data; the CLI is turbine.

Quick start

# 1. Scaffold a project
uv run turbine init --database duckdb

# 2. Edit the generated contract and DuckDB path, then validate and run
uv run turbine lint src/<project>/contracts/example-contract.yml
uv run turbine check src/<project>/contracts/example-contract.yml --datasource default

The starter contract deliberately leaves team, support, and customProperties for you to fill in; lint reports those three fields until you add them. DuckDB needs no credentials file. PostgreSQL and Snowflake initialization create .env.example; copy it to the ignored .env file and fill its values for those backends.

For a populated multi-backend project, see the manual demo.

Features

  • YAML contracts in ODCS v3.1.0 — schema, ownership, SLAs, quality checks in one file
  • Quite a few check types — missing, duplicate, invalid values, freshness, row count, custom SQL, Python, group, and window checks (z-score, spike, flatline)
  • Schema drift detection — compare your contract to the live database before running a single check
  • Dimension-aware scoring — every check is weighted by its quality dimension (completeness, accuracy, consistency, timeliness, validity)
  • Row-level flagging — failing rows are persisted in a per-cell bitmap matrix; query which rows failed which checks across runs
  • Management API + dashboardturbine serve exposes runs, results, scores, and flagged rows over HTTP
  • Code generation — scaffold SQLModel models and FastAPI routers from contracts
  • IDE support — full LSP with VS Code and soon JetBrains extensions

Management API

turbine serve --datasource default --port 8000

Endpoints under /api/v1/manage/: /contracts, /checks/run, /runs/{id}, /runs/{id}/results, /flagged-rows/{table}. Browse /api/v1/manage/docs for the interactive OpenAPI page.

turbine dashboard --port 5173

Renders the same data as charts, run history, and a flagged-rows explorer.

CLI

turbine lint     <contract.yml>                     # validate the YAML offline
turbine validate <contract.yml> --datasource <name> # compare to live database schema
turbine check    <contract.yml> --datasource <name> # lint + validate + run every check
turbine status                                      # project health, flagged-row counts
turbine bump                                        # update contract versions
turbine new      contract|datasource|check          # scaffold a new resource
turbine generate                                    # SQLModel + FastAPI from contracts

Ecosystem

Orchestrators. Run Turbine Check Runs as native steps in your workflow tool:

  • dagster-turbine — Check Definitions become Dagster AssetCheckSpecs. Partitioned assets scope each Check Run to their partition window.
  • airflow-turbineTurbineOperator with a deferred trigger; tasks wait on a Check Run without blocking a worker.
  • turbine-client — sync + async Python client. Use directly when you need glue beyond the integrations above.

Editors.

  • VS Code extension — diagnostics, autocomplete, quick fixes, run-from-editor. Install Turbine from the Marketplace.
  • JetBrains plugin — same surface for IntelliJ, PyCharm, DataGrip.

Documentation

Start at the documentation index, then choose the section that matches your task:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

turbine_data-0.8.2.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

turbine_data-0.8.2-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file turbine_data-0.8.2.tar.gz.

File metadata

  • Download URL: turbine_data-0.8.2.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for turbine_data-0.8.2.tar.gz
Algorithm Hash digest
SHA256 7b734d6541b83dfd00bd42adf21cc070b09aadb91cc472f0837a9bc29b854192
MD5 3ace67d84e970ef7d5bec85ac7e1e25d
BLAKE2b-256 69d288aed1b6fc81c997888356176c78d7ab2385210e78564159a4a4ecb30f2d

See more details on using hashes here.

File details

Details for the file turbine_data-0.8.2-py3-none-any.whl.

File metadata

  • Download URL: turbine_data-0.8.2-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for turbine_data-0.8.2-py3-none-any.whl
Algorithm Hash digest
SHA256 81b86d3485de3c25ef86d15a8e7aefa31fe6720de71b99133c020c2ca6d0ce38
MD5 2d0bb2ecb64414470ca1319514e32147
BLAKE2b-256 32ed228c77ea142d0285fc262281702d1a9ffb6dba37693fff194746e24770cc

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.5

2 files

0.8.4

2 files

0.8.3

2 files

This release

0.8.2 This release

2 files

0.8.1

2 files

0.8.0

2 files

0.7.12

2 files

0.7.11

2 files

0.7.10

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.13

2 files

0.5.12

2 files

0.5.11

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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