Skip to main content

CELINE Utils

A collection of shared utilities, libraries, and command-line tools that form the technical backbone of the CELINE data platform. Provides reusable building blocks for data pipelines, governance, lineage, metadata management, and platform integrations.

Not an end-user application — a platform utility layer embedded into CELINE applications and executed within orchestrated environments using Meltano, dbt, Prefect, and OpenLineage.


Scope and goals

  • Centralise cross-cutting platform logic used by multiple CELINE projects
  • Provide opinionated but extensible tooling for data pipelines
  • Enforce consistent governance and lineage semantics
  • Reduce duplication across pipeline applications
  • Act as a stable foundation for CELINE-compatible services and workflows

Key capabilities

Governance framework

A declarative governance.yaml specification defines the metadata, access control, and dataspace exposure rules for each dataset.

The GovernanceRule model covers:

  • Dataset ownership (ownership, attribution), resolved through an owner registry
  • License and access level (open, internal, restrictedsecret is accepted for compatibility and normalised to restricted)
  • Data classification (pii, green, yellow, red) and retention
  • Tags, documentation links, and source system
  • row_filters — list of filter specs ([{handler, args}]) for per-subject consent-based row filtering
  • Two exposure gates, ANDed: expose controls whether the dataset is listed in the DCAT catalogue and served by the API, while dataspace.expose controls whether it is offered into the dataspace as an EDC asset. expose is tri-state — unset falls back to dataspace.expose so pre-split files keep their behaviour

Extended blocks for DCAT-AP 3.0 and dataspace integration:

dcat: block — propagated to the DCAT-AP catalogue by dataset-api:

  • publisher_uri — overrides the API-level fallback publisher
  • themes — EU Publications Office data-theme URIs
  • language_uris — dct:language URIs
  • spatial_uris — dct:spatial URIs
  • accrual_periodicity — dct:accrualPeriodicity URI
  • conforms_to — dct:conformsTo URI
  • temporal.start / temporal.end — dct:temporal coverage

dataspace: block — consumed when registering datasets in EDC:

  • expose — offer the dataset into the dataspace
  • contract_required — enables ds:contractRequired ODRL constraint
  • consent_required — enables ds:consentStatus ODRL constraint and consent-based row filtering
  • odrl_action — default ODRL action (default use)
  • purpose — ODRL purpose values
  • medallion — data quality level (gold / silver / bronze)

ontology: block — which mapping spec says what the columns mean: spec (a shared mapping published in celine-ontologies) or spec_file (a path relative to the governance file). Exactly one, enforced by the schema.

Governance rules are resolved with pattern matching via GovernanceResolver: exact key first, then the longest matching glob, then defaults alone. The chosen rule is overlaid on the defaults using the fields the file explicitly set — not truthiness — so expose: false withdraws a dataset instead of being silently dropped. tags and dataspace.purpose union, consent_required and contract_required OR, ownership / row_filters / ontology replace wholesale. See the format reference for the full table.

celine.governance is the single parser: dataset-api, ds and celine-superset import it rather than reimplementing it. EDC-specific sub-objects in the dataspace: block belong to ds and are ignored here via model_config = ConfigDict(extra="ignore") rather than rejected.

Pipeline orchestration

Structured execution layer for:

  • Meltano ingestion pipelines
  • dbt transformations, tests, and seeds (dbt_seed wrapper)
  • Prefect-based Python flows (Prefect 3.x)

The PipelineRunner coordinates execution, logging, error handling, and lineage emission consistently across tools. Pipeline run environment variables can be injected via pipeline_run_envs for local runtime configuration.

See the pipeline tutorial.

OpenLineage integration

  • Automatic emission of START, COMPLETE, FAIL, and ABORT events
  • Dataset-level schema facets
  • Data quality assertions from dbt tests
  • Custom CELINE governance facets (including row_filters, medallion, classification)

Dataset tooling

The DatasetClient enables:

  • Schema and table introspection
  • Column metadata inspection
  • Safe query construction
  • Export to Pandas

Platform integrations

  • MQTT pipeline run events, published through celine-sdk
  • Keycloak client-credentials tokens, for authenticating to a protected Marquez

Keycloak and Superset administration was removed in 2.3.0 along with the celine-utils admin command tree — it was a replicable-setup tool with no remaining callers. Provisioning lives in celine-policies.


CLI

celine-utils governance generate marquez --app <app>   # scaffold governance.yaml from Marquez
celine-utils pipeline init app <name>                  # scaffold a new pipeline app
celine-utils pipeline run (meltano | dbt | prefect)    # run a pipeline stage

Full reference: CLI.


Repository structure

src/celine/
  governance/        the thin core — three dependencies, imported by other repositories
  utils/
    cli/
    common/
    datasets/
    pipelines/
schema/              JSON Schemas — published, and symlinked into the package
docs/
tests/
integration-tests/

Configuration

Environment-driven via pydantic-settings:

  • Environment variables first
  • Optional .env files
  • Typed validation with container-friendly defaults

Documentation

Two tracks — see the documentation index.

Governance as a library

Building and running pipelines

Why choices were madeDecisions.


Installation

uv add celine-utils                    # governance only — three dependencies
uv add "celine-utils[pipelines]"       # dbt / Meltano / Prefect / lineage
uv add "celine-utils[all]"             # pipelines + the typed OpenLineage facet

Parsing governance.yaml needs no extras. That is deliberate and enforced by CI — see ADR-0001.


Intended audience

  • Data engineers
  • Platform engineers
  • CELINE application developers

License

Copyright © 2025 Spindox Labs

Licensed under the Apache License, Version 2.0.

Download files

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

Source Distribution

celine_utils-2.5.0.tar.gz (112.3 kB view details)

Uploaded Source

Built Distribution

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

celine_utils-2.5.0-py3-none-any.whl (101.3 kB view details)

Uploaded Python 3

File details

Details for the file celine_utils-2.5.0.tar.gz.

File metadata

  • Download URL: celine_utils-2.5.0.tar.gz
  • Upload date:
  • Size: 112.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for celine_utils-2.5.0.tar.gz
Algorithm Hash digest
SHA256 cf3ca4741d4fe73d946e40b23ab2a2236e84e95928fe598aa63d550339cb5577
MD5 5ba89e9d8e33166278d1b7c27a72d0a3
BLAKE2b-256 f0f930fdc625cbba5ce8bd34de4500f0b25f12ff25e0ce09f8095765c4e4da8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for celine_utils-2.5.0.tar.gz:

Publisher: release.yaml on celine-eu/celine-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file celine_utils-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: celine_utils-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 101.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for celine_utils-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d171109a5afcfd5a075c5f96cfc1a074c87aac9e9b64b4c20542b2287e3c3d6
MD5 062fd3aadd9b5c92d1baa64c2b6c276e
BLAKE2b-256 bd6c6a123230183f0e81c25a0bca6cd5804466c2feb216cb1de9413407a242f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for celine_utils-2.5.0-py3-none-any.whl:

Publisher: release.yaml on celine-eu/celine-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.5.0 This release

2 files

2.4.0

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.18.1

2 files

1.18.0

2 files

1.17.0

2 files

1.16.0

2 files

1.15.0

2 files

1.14.3

2 files

1.14.2

2 files

1.14.1

2 files

1.14.0

2 files

1.13.0

2 files

1.12.0

2 files

1.11.0

2 files

1.10.2

2 files

1.10.1

2 files

1.10.0

2 files

1.9.4

2 files

1.9.3

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

2 files

1.8.5

2 files

1.8.4

2 files

1.8.3

2 files

1.8.2

2 files

1.8.1

2 files

1.8.0

2 files

1.7.1

2 files

1.7.0

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.0

2 files

1.4.4

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

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