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).

Not yet: PII auto-detection, integrity checks, alerts (0.5).

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

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.3.1

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.3.1
File Size Uploaded Provenance Actions
due_extractor-0.3.1.tar.gz 413.9 kB With provenance Details for due_extractor-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 536.5 kB

Release files / due_extractor-0.3.1.tar.gz

Download URL due_extractor-0.3.1.tar.gz
Size 413.9 kB
Tags Source
SHA-256 checksum
How to use checksums
78182baaabdf9671a2fda0f2d9cccad791c94aad6ba41cc7b514c38647d41af3
BLAKE2b-256 checksum
How to use checksums
dc09e30a58aaad91b99a822a11941d2d982aa754152aff918d73f96aa203068b
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.3.1-py3-none-any.whl

Download URL due_extractor-0.3.1-py3-none-any.whl
Size 122.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69bc7b90e1fd4cf6b9d636678b1ee83d4b68f5279093f1119a90b974c4b36708
BLAKE2b-256 checksum
How to use checksums
8a3282139ae6f39ef4ba3b07c5955926372b7a67a9be12ae7bf6b2da407457c0
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.3.1

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.3.1.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