Skip to main content

art30-emit

CI status on main art30-emit on PyPI Python versions art30-emit runs on Licence: Apache-2.0

Put the OpenLineage Art. 30 processing facet on the wire from code that emits nothing today.

dbt, Airflow, Spark and Flink all emit OpenLineage, and none of them emits purpose or legal_basis. Everything else a record of processing activities needs — what ran, what it read, what it wrote, when, and in some cases what the data is — can be evidenced from what an organisation already runs. Those two fields cannot, so they end up asserted in a spreadsheet beside the code and drift from it within a quarter.

This package emits them from the thing that ran, for the systems nobody instruments: a Lambda, a stored procedure behind a shell wrapper, a cron job, a notebook that matters more than it should.

Install

pip install art30-emit

One runtime dependency, openlineage-python. Python 3.12 or later.

Use it as a context manager

from art30_emit import declare

with declare(
    "acme.crm/consent-sync",
    purpose="customer-administration",
    legal_basis="contract",
    reads=["warehouse/crm_raw.consent_events"],
    writes=["warehouse/crm_curated.consent_state"],
    classify={
        "warehouse/crm_curated.consent_state": {
            "data_category": "contact",
            "subject_type": "customer",
            "residency": "eu",
            "retention": "P7Y",
        }
    },
):
    sync_consent()

START is emitted on entry and COMPLETE on exit. An exception emits FAIL with the error message and stack trace, then continues to propagate: a record of what happened must not change what happens.

Use it as a command wrapper

The wrapper reaches work an import cannot — a stored procedure called from a shell script, an SSIS step, a binary somebody compiled in 2014.

art30-emit \
    --job acme.billing/monthly-invoices \
    --purpose contract-performance \
    --legal-basis contract \
    --reads warehouse/billing_raw.usage \
    --writes warehouse/billing_curated.invoices \
    --tag warehouse/billing_curated.invoices:data_category=financial \
    --tag warehouse/billing_curated.invoices:subject_type=customer \
    -- ./run-invoicing.sh

The command runs unchanged and its exit status is forwarded. A non-zero status emits FAIL rather than COMPLETE, so a record built from these events can tell an auditor which runs finished.

Where the events go

Wherever the OpenLineage client is configured to send them, through OPENLINEAGE_URL or OPENLINEAGE_CONFIG as that client documents. A transport this package invented would be one more thing to trust.

For a first run, with neither set, ART30_EMIT_FILE appends the events to a file so you can read what was produced:

ART30_EMIT_FILE=events.jsonl art30-emit --job demo/hello --purpose demonstration \
    --legal-basis consent -- echo hello

Naming the task that launched this job

When OPENLINEAGE_PARENT_ID is set to namespace/job/run_id, every event carries the standard parent run facet naming that job and run, and root too if OPENLINEAGE_ROOT_PARENT_ID is set — the same two variables dbt-ol reads, so an orchestrator already configured for dbt, such as an Airflow task using its lineage_parent_id macro, needs nothing new to be named as the parent here. A value not in that three-part form is refused with a sentence naming the shape, rather than producing a facet with some of its fields missing. Neither variable set, nothing changes on the wire.

Naming the code that ran

--repository and --commit (with --branch and --path where they matter) put the standard sourceCodeLocation job facet on every event, naming the code the same way repoUrl and version do in the OpenLineage spec. A container image can set ART30_EMIT_REPOSITORY and ART30_EMIT_COMMIT once, at build time, from the commit CI is building, so every job the image runs reports its code without repeating either flag:

ARG GIT_COMMIT
ENV ART30_EMIT_REPOSITORY=https://github.com/acme/fund-feed \
    ART30_EMIT_COMMIT=${GIT_COMMIT}

A flag on the command line overrides the matching variable. Neither given, nothing changes on the wire.

Two rules it keeps

It emits the published facet, not one of its own. The schema is openlineage-art30-processing-facet.json, generated from a governance model rather than written beside it, and the classification rides on the standard tags dataset facet (spec 1-0-0) rather than a private key. A second spelling of the same fields would be a private vocabulary wearing a standard's clothes.

It never decides anything. No validation against a compiled list of purposes, no guessing a legal basis from a job name, no default that fills a field nobody declared. What the caller says is what goes on the wire, and what the caller does not say is absent — which is the state a record has to be able to report, because nobody said and we say it is none are different answers to an auditor.

What reads it

Any governance layer that reads OpenLineage. Qedro turns these events into a GDPR Art. 30 record of processing activities, and pipeline-runtime emits the same facet from pipelines it executes — this is the second implementation of that schema rather than a second definition of it.

Licence

Apache-2.0.

Metadata

Release files for art30-emit 0.3.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 art30-emit 0.3.0
File Size Uploaded Provenance Actions
art30_emit-0.3.0.tar.gz 29.3 kB With provenance Details for art30_emit-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for art30-emit 0.3.0
File Interpreter ABI Platform Actions
art30_emit-0.3.0-py3-none-any.whl Python 3 none any Details for art30_emit-0.3.0-py3-none-any.whl

Total release size: 45.8 kB

Release files / art30_emit-0.3.0.tar.gz

Download URL art30_emit-0.3.0.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cba108ad5934c8fe50100e89ed7513a2804416d1d54cba170116b95e7b373ace
BLAKE2b-256 checksum
How to use checksums
9d20da63db467cb4f932a09a36cf542878d8147560642bf7e211565a1299fe5c
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 22, 2026.

Transparency log

Release files / art30_emit-0.3.0-py3-none-any.whl

Download URL art30_emit-0.3.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8995550082356ab876034580b569bbc3ad5c08208b2a1731d4cfaed20a50aee5
BLAKE2b-256 checksum
How to use checksums
ffd650e6eeb3870c9ac43cd2891600f5545ff5c86e08e0f770a68691eb5e2717
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 22, 2026.

Transparency log

Security for art30-emit 0.3.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for art30_emit-0.3.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 22, 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