Skip to main content

Local-first ETL/ELT pipelines that run on DuckDB. CLI, Python API, and MCP server for AI agents.

Project description

Duckle

Local-first ETL/ELT pipelines that run on DuckDB. Python builds the plan, DuckDB moves the rows. Your data never leaves the machine.

PyPI License GitHub

Build your first pipeline

Paste this into Claude Code, Cursor, or Codex. The agent does the rest.

Run uvx duckle quickstart to build my first pipeline and run it

Nothing to install first. The agent fetches Duckle and the DuckDB engine on demand, runs a real pipeline, and shows you the rows.

Prefer to drive it yourself:

uvx duckle quickstart      # no install
pip install duckle         # or install it
Terminal: uvx duckle quickstart scaffolds sample data and a pipeline, runs it, and prints the resulting rows

quickstart scaffolds sample data and a pipeline, runs it, and shows you the rows. One command from nothing to a result, because the engine comes with it: a ~20 MB native binary plus the DuckDB CLI. No JVM, no Docker, no server, no account.


Or install it

Terminal: pip install duckle brings the DuckDB engine, then a job.py using the Python API reads a CSV, filters, derives a column and writes Parquet

Where uvx is for trying it, pip is for keeping it: a persistent duckle command, duckle-mcp for agents, and import duckle in Python.

No data passes through Python

Every method appends a node to a pipeline graph. Nothing executes until .run(), and then the whole graph is handed to the engine, compiled to SQL, and executed inside DuckDB.

That is the difference from a dataframe library: a billion-row job costs what the SQL costs, because it is SQL. There is no interpreter in the data path, and no to_pandas() escape hatch quietly pulling rows into memory.

import duckle
from duckle import col

(duckle.read_csv("orders.csv")
    .where(col.amount >= 20)
    .derive(total="round(amount * 1.2, 2)", tag="f'{region}-{id}'")
    .write_parquet("out.parquet")
    .run())

Python expressions, compiled to SQL

amount * 1.2, f'{a}-{b}', x if c else y, name.strip().upper() and email is None are translated to vectorized DuckDB SQL at plan time:

.derive(band="'high' if amount > 50 else 'low'")
# CASE WHEN ("amount" > 50) THEN 'high' ELSE 'low' END

An expression with no exact SQL equivalent is rejected with the construct named, never quietly executed somewhere slower. Comprehensions, lambda, indexing and eval are refused by name.

Prefer editor completion over strings? col builds the same tree with real operators, and fragments are reusable:

eu_only = col.region.isin(["EU", "UK"])
p.where(eu_only & (col.amount >= 20))

See exactly what will run, before it runs:

p.explain()   # prints the compiled SQL, one block per stage

359 components, not 10 file formats

Component ids map onto attribute paths, so anything in the catalog is reachable:

duckle.src.salesforce(object="Account", authMode="clientCredentials")
duckle.xf.geo.reproject(geomColumn="geom", targetCrs="EPSG:3857")
duckle.snk.salesforce.bulk(operation="upsert", externalIdField="Ext__c")

104 sources, 66 sinks and 138 transforms: Postgres, MySQL, Oracle, SQL Server, Snowflake, Databricks, Teradata, SAP OData, Salesforce (including Bulk API 2.0), Kafka, WebSocket, S3, SFTP, IMAP, LanceDB and more.

duckle.component_ids(contains="salesforce")
duckle.describe("snk.salesforce.bulk")   # settings, and which ones the engine ignores

A CI gate that needs no engine

Terminal: duckle validate reports one failing and one passing pipeline, then exits 1

duckle validate compiles every pipeline without opening a source or writing a sink, so it needs no DuckDB, no credentials and no network. Exit codes are stable and safe to gate on:

code meaning
0 clean
1 a real finding: a pipeline failed, or did not compile
2 the runner could not start: bad usage, missing engine
duckle validate --json          # machine-readable, for a build step
duckle --pipeline my.json       # run one

Note: validate does not yet catch every missing required property, so a clean validate is not proof that a run will succeed.

Agent-ready, with nothing installed

Terminal: adding duckle as an MCP server via uvx, then an agent discovering Salesforce connectors, reading a component schema, creating a pipeline that compiles, and running it

The same package is an MCP server, so an AI agent gets a governed way to work with data instead of a shell. Point Claude Code, Claude Desktop or Cursor at it:

{ "mcpServers": { "duckle": { "command": "uvx", "args": ["duckle", "mcp"] } } }

Or in Claude Code:

claude mcp add duckle -- uvx duckle mcp

That is the whole setup. No pip install, no PATH, no engine to configure: uv fetches the package and the DuckDB engine into a throwaway environment and the server finds it there. If you did pip install duckle, "command": "duckle", "args": ["mcp"] works the same way.

19 tools, including list_components, get_component_schema, create_pipeline, validate_pipeline, run_pipeline, pipeline_lineage, trust_report and schema_drift.

What that buys over letting an agent write a script: it can discover a real connector rather than guess one, compile-check a pipeline before anything executes, run it, and get column-level lineage back. validate_pipeline opens no source and writes no sink, so an agent can check its work without touching your data. The pipeline it produces is the same JSON your desktop canvas opens, so you can inspect what it built.

Code and canvas are the same file

Pipelines are the same JSON the Duckle desktop studio reads. A pipeline written in Python opens on the canvas, and one drawn on the canvas runs from Python:

p.save("pipelines/orders.json")          # opens in the studio
duckle.from_json("pipelines/orders.json").run()

Install notes

duckle depends on duckdb-cli, published by the DuckDB Foundation, so the engine arrives with the install and works offline. To pin your own build instead, set DUCKLE_DUCKDB_BIN.

Wheels ship for Linux, macOS and Windows on x86-64 and arm64. The wheel carries a compiled Rust binary and is Python-version independent (py3-none-<platform>).


Apache-2.0  ·  GitHub  ·  duckle.org  ·  Issues

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

duckle-0.5.11-py3-none-win_arm64.whl (21.9 MB view details)

Uploaded Python 3Windows ARM64

duckle-0.5.11-py3-none-win_amd64.whl (23.1 MB view details)

Uploaded Python 3Windows x86-64

duckle-0.5.11-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (23.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

duckle-0.5.11-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (22.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

duckle-0.5.11-py3-none-macosx_11_0_x86_64.whl (21.4 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

duckle-0.5.11-py3-none-macosx_11_0_arm64.whl (20.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file duckle-0.5.11-py3-none-win_arm64.whl.

File metadata

  • Download URL: duckle-0.5.11-py3-none-win_arm64.whl
  • Upload date:
  • Size: 21.9 MB
  • Tags: Python 3, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for duckle-0.5.11-py3-none-win_arm64.whl
Algorithm Hash digest
SHA256 d78a913ba68ab78ba87097c1617e453c72a016a41261427789684058c67a6df8
MD5 3c1e6a7ff506eb6c15048a7c692d1ce6
BLAKE2b-256 0c587f20894c9569201f495f0edf219eecedd329d379fd2d7955b06885292d5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for duckle-0.5.11-py3-none-win_arm64.whl:

Publisher: pypi.yml on slothflowlabs/duckle

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

File details

Details for the file duckle-0.5.11-py3-none-win_amd64.whl.

File metadata

  • Download URL: duckle-0.5.11-py3-none-win_amd64.whl
  • Upload date:
  • Size: 23.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for duckle-0.5.11-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4e2e91a3043e948971a573e6250269689aadad01903f5c38a2187b536bf1c798
MD5 70bc93b67a0f89c304e3812381f089f2
BLAKE2b-256 aec527ac2a3028816a774bb7bcaf9a7bfe63d2ea7e945589c65bd50c9b16695b

See more details on using hashes here.

Provenance

The following attestation bundles were made for duckle-0.5.11-py3-none-win_amd64.whl:

Publisher: pypi.yml on slothflowlabs/duckle

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

File details

Details for the file duckle-0.5.11-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for duckle-0.5.11-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5ecd131f9567270c11b6587123f3d0431aa22870ffb043ed335f253ba218b6cb
MD5 53fcfe26a680ff824541f2890bd560fe
BLAKE2b-256 fb981ab76800e834c94338c9633fb7d8c76be369cd3e3e8a92a7260fc3f764de

See more details on using hashes here.

Provenance

The following attestation bundles were made for duckle-0.5.11-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: pypi.yml on slothflowlabs/duckle

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

File details

Details for the file duckle-0.5.11-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for duckle-0.5.11-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 afb8c9a6f9d700512c5402723f52ee7cc9801ff476571ff635aacd53a6d6efa1
MD5 ca284f5c37d4b91f407b47a29cbe3529
BLAKE2b-256 18a4b1735eba0f753555ceec4645e96b4abed17e6e99fd50dd76cf64d0af5a0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for duckle-0.5.11-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: pypi.yml on slothflowlabs/duckle

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

File details

Details for the file duckle-0.5.11-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for duckle-0.5.11-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 ef6d8ef03c9816965a61a997ec227ac0891757805998a236609d9077e112cd93
MD5 6f765297741df6f382c034b07b191276
BLAKE2b-256 a6077017cfb8e8d4e67bfbfb5508f37670c2577cb0148785d7151305b4150e2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for duckle-0.5.11-py3-none-macosx_11_0_x86_64.whl:

Publisher: pypi.yml on slothflowlabs/duckle

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

File details

Details for the file duckle-0.5.11-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for duckle-0.5.11-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76f03c51efa3b5a4c463749cdb7d53d973b5a7ed185b2cf775369763e3447d73
MD5 055c61040c4a7e3cfe2252253e62e61b
BLAKE2b-256 cdcd8dbed2c62b2af22b40e8a11d966dddae52ed4dc0eb0607b8115cbe040cb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for duckle-0.5.11-py3-none-macosx_11_0_arm64.whl:

Publisher: pypi.yml on slothflowlabs/duckle

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page