Skip to main content

DUE

by Abhishek Manjunatha

Declarative Universal Extractor. Extract from any API and land it in your data lake, with no custom scripts. DUE handles REST, GraphQL, XML/SOAP, files and report APIs, plus auth, pagination, rate limits, retries, safe incremental loads and deduplication. Records land unchanged in local storage, S3, GCS or ADLS. It is EL only: transformation belongs downstream.

Status: Phase 3 in progress. M1–M4 are done (release 0.3 is feature-complete); M5 (integrity and PII) is next. Design approved, spec v1 frozen (2026-11-27). The plan and SDLC roadmap are in docs/DUE_PLAN.md.

Design (Phase 2 approved · spec v1 frozen)

What works today (M1–M4, release 0.3)

  • due validate: checks a project (every profile) or a single source file against spec v1: unknown keys with "did you mean", file and line, secrets syntax, templates, hooks, and stream references.
  • due config show [source[.stream]]: every effective setting and the layer it came from (defaults, project, profile, source, stream, env).
  • due spec fields [path] [-m]: every spec field tagged * mandatory, * when … conditional, or optional (with its default), plus type, rules and description. The same catalog generates the field reference and due spec schema (JSON Schema for editor autocomplete).
  • params:: declare each ${NAME} placeholder (required/optional, type, pattern, allowed values, min/max, secret). due validate --check-secrets checks the real values without printing secrets.
  • due --version
  • All defaults live in src/due/defaults.yaml (ADR-011). Override project settings with DUE__SECTION__KEY=value.

M2 (HTTP core) is built. It's a resilient async client: every auth type (API key, bearer, basic, OAuth2 client credentials, login chains, Python hooks), token-bucket and adaptive rate limiting (Retry-After, X-RateLimit-*, body backoff), retries with jittered backoff, a circuit breaker, safety limits, ETag/Last-Modified requests, corporate CA bundles, mTLS, proxies and optional HTTP/2. Secrets are redacted from every error.

M3 (sources, pagination and decoders) is built.

  • Stream types: REST, GraphQL, SOAP, file downloads (streamed to disk), request → poll → download reports, and child streams.
  • Pagination: all 7 styles, each guarded against loops.
  • Decoders: JSON, NDJSON, CSV/TSV, XML (XPath, entity-attack protection), Excel, Parquet, text and zip/gzip archives.
  • Also: matrix partitions and incremental windows.
  • due preview source.stream fetches real records without writing anything.

17 example connectors on real public APIs are in connectors/.

Release 0.1 is feature-complete: due run extracts streams into a local lake (file://, NDJSON, gzip).

  • Commit protocol: a failed run leaves nothing readable, a rerun replaces its window, and state never runs ahead of the data.
  • Duplicate check across overlapping windows.
  • Lease locks, plus due unlock for crashed runs.
  • _rejected/ for records without a key or cursor.
  • Explicit PII field actions (hash, mask, drop).
  • A _due_* metadata column on every record.

Release 0.3 (M4) is feature-complete.

  • Cloud lakes: s3://, gs:// and abfs:// through fsspec (install due-extractor[s3], due-extractor[gcs] or due-extractor[azure]).
  • Output formats: NDJSON, CSV, Parquet and Avro, compressed with gzip, zstd or snappy.
  • Delete detection: deletes: { mode: snapshot_diff, every: 7d } lands tombstones (_due_op: delete) for keys that disappeared.
  • Resume (G6): a long extraction that dies continues from its last page checkpoint.
  • matrix_from: partitions fed from another stream's records.
  • due backfill src.stream --from … --to …: replaces those windows and never moves the watermark back.
  • Housekeeping: due retry RUN_ID re-runs only failed units with their original windows; due state show|reset; due prune applies retention.
  • Crash suite: tests kill a run at every commit step and check that no data is lost or duplicated and state never runs ahead (G1–G7).

M5 (integrity and PII) is built, and goes out in 0.5 together with M6:

  • Integrity checks:
    • reconcile_total compares the fetched count with the API's own total, and is on automatically when the paginator reads one.
    • min_records catches a silent 200 [].
    • volume_collapse warns when the count drops far below recent runs.
    • max_rejected_ratio limits keyless or unparseable records.
    • fail blocks the commit and keeps the previous data. warn commits and reports it.
  • PII detection of emails, phone numbers, card numbers, tokens and IP addresses, before anything is written. A detected field gets pii.default_action and a pii.detected notice, so you can add an explicit pii.fields rule.

M6 (alerting and observability) is built, and released in 0.5 (pipx install due-extractor):

  • Alerts to Slack, Microsoft Teams, Google Chat, Discord, PagerDuty, email (SMTP) or any webhook.
    • Rules decide which events go where.
    • throttle stops a flapping API from flooding a channel.
    • Each channel gets one grouped message per run.
  • Every run gets a self-contained HTML report next to its summary. due runs lists history and due report RUN_ID --open opens one.
  • observe.log_format: json prints one JSON event per line for log shippers.
  • OpenLineage run events and OpenTelemetry metrics (the otel extra), both optional.

M7 (developer tools) is built, and released in 0.7 (pipx install due-extractor):

  • due init --from-url | --from-curl | --from-har | --from-postman | --from-openapi drafts a source file. It suggests records, pagination, key, cursor and PII rules. Credentials become ${NAME} placeholders.
  • due doctor checks a stream against the live API: auth, pagination ends, page overlap, sort stability and rate headroom. due discover lists fields and suggests key, cursor and PII rules.
  • due plan shows what a run will do and roughly how many requests it will take.
  • due test record / due test replay records real responses once (secrets redacted, PII protected) and replays them offline in CI with assertions.
  • due query "SQL" runs DuckDB over the lake's current data (<source>__<stream> and …__latest views). due diff RUN_A RUN_B compares two runs row by row.
  • due schedule add|list|remove registers runs with cron or Windows Task Scheduler. due schedule export --to github-actions|airflow|cloud-scheduler|eventbridge writes a template.

Install

pipx install "due-extractor[parquet]"     # or: uv tool install due-extractor
due --version

The PyPI package is due-extractor; the command and the Python import are both due.

Try it

uv sync --group dev
uv run due validate connectors
uv run due config show usgs.earthquakes -C connectors -p cloud
uv run due spec fields source.auth --mandatory
uv run due preview wikipedia.recent_changes -C connectors -n 10
uv run due preview github.issues -C connectors --partition repo=pandas-dev/pandas
uv run due run ecb usgs -C connectors          # lands in connectors/lake/ (git-ignored)
uv run due run usgs -C connectors              # re-run: only the lookback overlap, unchanged records skipped
uv run due backfill github.issues --from 2026-11-01 --to 2026-11-08 -C connectors
uv run due state show usgs.earthquakes -C connectors
uv run due prune --dry-run -C connectors
uv run due runs -C connectors
uv run due init my-project --from-url "https://dummyjson.com/users?limit=30&skip=0"
uv run due doctor dummyjson.users -C my-project
uv run due query "SELECT count(*) FROM dummyjson__users__latest" -C my-project
uv run due report <run_id> --open -C connectors

Develop

uv run ruff format src tests tools; uv run ruff check src tests tools
uv run mypy src tools
uv run python tools/check_hardcoding.py
uv run pytest --cov
uv run pytest -m live          # real public APIs (httpbin chaos tests); nightly in CI

CI runs the same gates on Windows, macOS and Linux with Python 3.12 and 3.14 (ci.yml).

Layout

  • src/due/: the package (spec/, secrets/, http/, paginate/, sources/, decode/, lake/ storage and writers, run/ planner, runner and prune, cli/)
  • connectors/: example project on real public APIs (also the validation fixture)
  • tests/: unit tests
  • tools/: repo tooling (the hard-coding lint)
  • docs/: plan, design and ADRs
  • legacy/: the old bk-pipeline code and its history, kept locally for reference only and git-ignored

Metadata

Release files for due-extractor 0.7.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 due-extractor 0.7.0
File Size Uploaded Provenance Actions
due_extractor-0.7.0.tar.gz 485.5 kB With provenance Details for due_extractor-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for due-extractor 0.7.0
File Interpreter ABI Platform Actions
due_extractor-0.7.0-py3-none-any.whl Python 3 none any Details for due_extractor-0.7.0-py3-none-any.whl

Total release size: 671.1 kB

Release files / due_extractor-0.7.0.tar.gz

Download URL due_extractor-0.7.0.tar.gz
Size 485.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c0b8decd48d4acb2093e8e13c18108cb26a3cc034174ebbef33c532740ffb9cc
BLAKE2b-256 checksum
How to use checksums
8a6e9dd52a40591a348aa0f40471e04b483cba508038bb0b9915701dbfdee797
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 28, 2026.

Transparency log

Release files / due_extractor-0.7.0-py3-none-any.whl

Download URL due_extractor-0.7.0-py3-none-any.whl
Size 185.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a3a3b29514e2ffa8426fed801bde3dc9fd68beb1e590c83218d28afc92bd205
BLAKE2b-256 checksum
How to use checksums
15575b2e217cb33ab700e08b98640731c66b9e20ec2ea5078e901c3c75271840
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 28, 2026.

Transparency log

Security for due-extractor 0.7.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 due_extractor-0.7.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 28, 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