ducklake-sdk — Native SDKs for DuckLake
Read and write DuckLake tables from Rust and Python - no DuckDB required.
DuckLake is an integrated data lake and catalog format that stores metadata in a SQL catalog database and writes data as Parquet files. This repository provides standalone Rust and Python SDKs that talk to DuckLakes directly, with no dependency on DuckDB or its DuckLake extension.
All language SDKs are built on the same Rust core, which bundles the implementation of the DuckLake specification.
Python (ducklake-sdk)
Rust (ducklake)
[!WARNING] This is not an official SDK released by the DuckDB Foundation.
Getting Started
Python
pip install ducklake-sdk # core
pip install "ducklake-sdk[polars]" # Polars integration
pip install "ducklake-sdk[arrow]" # Arrow + DuckDB integration
Rust
cargo add ducklake
Quick Example
import ducklake as dl
import polars as pl
# Create a new DuckLake backed by SQLite metadata and local Parquet storage
ducklake = dl.create("sqlite:///metadata.sqlite", data_path="data_files/")
# Define a table.
table = ducklake.create_table(
"events",
schema={"id": dl.Int64(), "message": dl.Varchar()},
)
# Write data using Polars
lf = pl.LazyFrame({"id": [1, 2, 3], "message": ["hello", "ducklake", "sdk"]})
table.sink_polars(lf)
# Read it back as a Polars LazyFrame
df = table.scan_polars().collect()
For the full API, see the Python documentation or the Rust API docs.
Features
The Rust core — and therefore every SDK built on top of it — supports:
- Metadata operations — schemas, tables, schema evolution, partitioning, constraints, and table/column tags
- Transactions with conflict resolution
- Data inlining for small writes
- Metadata configuration
- Time travel queries
The Python SDK additionally provides:
- Reading and writing data through Polars
- Reading, writing, and deleting data through DuckDB
- Maintenance operations — compaction, snapshot expiration, and more — via DuckDB
Compatibility Matrix
Catalog Databases
| Database | Status |
|---|---|
| SQLite | ✅ |
| Postgres | ✅ |
| MySQL | 🟧 (no data inlining*) |
*Data inlining for MySQL is not defined in the DuckLake specification.
Storage Backends
| Backend | Status |
|---|---|
| Local / NFS | ✅ |
| AWS S3-compatible | ✅ |
| Google Cloud Storage | ✅ |
| Azure Blob Storage | ✅ |
DuckLake Specification Versions
| Version | Status |
|---|---|
| 1.0 | ✅ (actively supported) |
| 0.4 | ⬆️ (requires migration) |
| 0.3 | ⬆️ (requires migration) |
| 0.2 | ⬆️ (requires migration) |
| 0.1 | ⬆️ (requires migration) |
See the DuckLake release calendar for upcoming versions.
Project Status
[!NOTE] This project is in alpha. It will move to beta once the full specification is implemented, and to stable once all relevant limitations have been addressed. Expect occasional breaking changes until then.
Not yet implemented from the specification
-
GEOMETRYandVARIANTdata types - Mapping columns by name (Parquet files must currently carry field IDs)
- Views, macros, sort info, and encrypted files
Known limitations
Rust SDK (may impact efficiency):
- Tables partitioned with a non-identity transform do not benefit from file pruning yet.
- Filters are not pushed down into the metadata query. Statistics are still loaded eagerly and used by readers to prune files, but the metadata query may transmit more data than necessary.
Python SDK:
- Maintenance operations (compaction, snapshot expiration, ...) are dispatched to DuckDB rather than implemented natively.
- Performance of polars reads and writes can be optimized further:
- Writes currently require reading the file footer after the file has already been written (see also https://github.com/pola-rs/polars/issues/27226)
- Reads currently suffer from suboptimal footer reads (see also https://github.com/pola-rs/polars/issues/27227)
Contributing
Contributions, bug reports, and feature requests are very welcome. See the contribution guidelines to get started.
License
Licensed under the MIT License.
Release files for ducklake-sdk 0.0.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ducklake_sdk-0.0.16.tar.gz | 212.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| ducklake_sdk-0.0.16-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| ducklake_sdk-0.0.16-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| ducklake_sdk-0.0.16-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| ducklake_sdk-0.0.16-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| ducklake_sdk-0.0.16-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 47.6 MB
Release files / ducklake_sdk-0.0.16.tar.gz
| Download URL | ducklake_sdk-0.0.16.tar.gz |
|---|---|
| Size | 212.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c0f2506fd9801d82a90bb2f01b1fb87a8504b3bbbf276419c606f7ec6709087
|
|
BLAKE2b-256 checksum How to use checksums |
a29a2462f9216681e85908ab0d6b46c991a6185c8a43eded77d0aa910c9709ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 28, 2026.
Transparency logRelease files / ducklake_sdk-0.0.16-cp310-abi3-win_amd64.whl
| Download URL | ducklake_sdk-0.0.16-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 10.3 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6d3d3e1a4d62b23d25306dbf08e992d6b2b90960c4fd83c7bd924ef7425a731a
|
|
BLAKE2b-256 checksum How to use checksums |
5e4a39d28cf5b3463a6743b42c75ca4fa6bd40466d99c3aac93dafce59e4c2b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 28, 2026.
Transparency logRelease files / ducklake_sdk-0.0.16-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ducklake_sdk-0.0.16-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 9.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0c5c7a5f02fe22864a049a1d8af013f2e518e73744ea356a0824de86db2bf6b9
|
|
BLAKE2b-256 checksum How to use checksums |
9d4223d9ac7fd468beb542c937d75d29528317008b22a55362940b215e773a79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 28, 2026.
Transparency logRelease files / ducklake_sdk-0.0.16-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | ducklake_sdk-0.0.16-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 9.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
5c5127bc3dda24802a6be362eff9ece2e8cbd7fd45b9559510b7b7041d2cc4e9
|
|
BLAKE2b-256 checksum How to use checksums |
82058d36d151a10b8c2bff3821317d899114f4008093077aab9f499f9eea1ae2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 28, 2026.
Transparency logRelease files / ducklake_sdk-0.0.16-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | ducklake_sdk-0.0.16-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 8.8 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
012a2753156dc3fbf38f09720b3ece216e364a2947e51c60e5e616f3158dabe4
|
|
BLAKE2b-256 checksum How to use checksums |
b18e911ef944c2af6828b10df023edc6033308f4aa60187276c0cb8766076422
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 28, 2026.
Transparency logRelease files / ducklake_sdk-0.0.16-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | ducklake_sdk-0.0.16-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 9.4 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
ea10bf0bb1e08dad7aeffe0825a47f8209c94a3142cf9ce41b8b3cd8388b5954
|
|
BLAKE2b-256 checksum How to use checksums |
26c40c38b2cca4e4f46c67acbcfff8c86cfc43ba0d70be163abfe675cde50cf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Aug 28, 2026.
Transparency log