Skip to main content

ducktail

PyPI version CI codecov License Python Downloads Patches welcome GitHub Actions Security Analysis with zizmor 🌈 Dependabot Updates

tail -f for DuckLake tables.

Screenshot

Watch inserts, deletes, and updates flow through a DuckLake table in real time, powered by DuckLake's built-in CDC.

$ ducktail tail orders -C meta.duckdb

+ id=1 name=Alice amount=100.0
+ id=2 name=Bob amount=50.0
- id=2 name=Bob amount=50.0
Δ amount: 100.0 → 150.0

Install

pip install ducktail        # or: uv add ducktail

Requires Python 3.12+ and DuckDB 1.4+ (ducklake extension loads automatically).

Usage

Basic

ducktail tail TABLE -C CONNECTION
# DuckDB metadata catalog
ducktail tail events -C meta.duckdb -d /data

# Postgres metadata catalog
ducktail tail events -C "postgres:dbname=ducklake host=localhost user=ducklake password=ducklake"

Interactive mode

Full-screen TUI with color-coded rows (green inserts, red deletes, yellow updates):

ducktail tail events -C meta.duckdb -m interactive

Filter what you see

# Only specific columns
ducktail tail events -C meta.duckdb -col status -col amount

# Server-side filter (pushed into the CDC query)
ducktail tail events -C meta.duckdb -f "amount > 100"

# Faster polling
ducktail tail events -C meta.duckdb -i 0.5

Compose with Unix tools

Pager mode (the default) writes one line per change to stdout, so it plays nicely with the usual suspects:

# Inserts only
ducktail tail orders -C meta.duckdb | grep '^\+'

# Deletes only
ducktail tail orders -C meta.duckdb | grep '^\-'

# Count changes per second
ducktail tail orders -C meta.duckdb | pv -l > /dev/null

Options

ducktail tail [OPTIONS] TABLE_NAME
Option Short Default Description
TABLE_NAME (required) Table to tail
--connection -C (required) Catalog connection string
--catalog -c lake Catalog name
--data-path -d . Path to DuckLake data files
--namespace -n main Table namespace
--interval -i 1.0 Poll interval (seconds)
--columns -col (all) Columns to show (repeat for multiple)
--filter -f (none) CDC filter expression
--mode -m pager pager or interactive

Change symbols

Symbol Color Meaning
+ Green Row inserted
- Red Row deleted
Δ Yellow Row updated — shows column: old → new for each changed field

Try the demo

The repo includes a Docker-based demo that stands up a Postgres metadata catalog and a producer that streams a mix of inserts, deletes, and updates.

# Terminal 1 — infrastructure + producer
just demo-up
just demo-producer

# Terminal 2 — watch it happen
just demo-tail                # pager mode
just demo-tail-interactive    # or interactive mode

# Cleanup
just demo-down

Development

Requires flox and Docker (for integration tests and demo).

flox activate
just sync       # install deps
just test       # unit tests
just ci         # format + lint + typecheck + unit tests
Recipe What it does
just sync Install dependencies
just fmt Format code
just lint Lint
just typecheck mypy strict
just test Unit tests
just test-integration Integration tests
just test-all Both
just ci fmt-check + lint + typecheck + test

License

Apache License 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

ducktail-1.0.4.tar.gz (680.2 kB view details)

Uploaded Source

Built Distribution

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

ducktail-1.0.4-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file ducktail-1.0.4.tar.gz.

File metadata

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

File hashes

Hashes for ducktail-1.0.4.tar.gz
Algorithm Hash digest
SHA256 79fecb01a01992f6ab45a1ac6a707b4b26bd00102d5a84302d1806397105968c
MD5 7cfda60eb0da89fe3b52edc3341e7977
BLAKE2b-256 3652d4bff80b5bbf754451af64b42b4c8c3a112fd580c94645948c828ce3473d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ducktail-1.0.4.tar.gz:

Publisher: release.yml on jghoman/ducktail

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

File details

Details for the file ducktail-1.0.4-py3-none-any.whl.

File metadata

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

File hashes

Hashes for ducktail-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d7ab59b00b5d8403832791f22eaf4da99373f033647c140e2183103ffa16c0ef
MD5 9eb900fe7b0795130a56467679e379f4
BLAKE2b-256 34294a91784b0cb69b3904151b3079b82065f5fcd2b8f0090d9fe39e34c7bef8

See more details on using hashes here.

Provenance

The following attestation bundles were made for ducktail-1.0.4-py3-none-any.whl:

Publisher: release.yml on jghoman/ducktail

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

1.0.4 This release

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

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