A template for creating a Python-only Daft extension. If you're looking to create a Python + Rust Daft extension, see the daft-ext-rust-template instead.
- Clone this repository:
git clone https://github.com/Eventual-Inc/daft-ext-python-template.git - Rename the
daft_ext_template/package directory and updatenameinpyproject.toml - Fill in the remaining blanks in
pyproject.toml(description, authors, repository URL, etc.) - Install dependencies:
uv sync - Install pre-commit hooks:
uv run pre-commit install - Run the example test suite:
uv run pytest tests/ -v - Start developing!
This template ships a minimal greet function in daft_ext_template/__init__.py:
import daft
from daft_ext_template import greet
df = daft.from_pydict({"name": ["Ada", "Grace"]})
df.select(greet(df["name"]).alias("greet")).show()See the Extensions overview and UDF API docs for patterns like batch UDFs, class UDFs, and custom aggregations.
Versions are derived from git tags via hatch-vcs. Tag releases as v0.1.0, v0.2.0, etc.
Publishing a GitHub release triggers .github/workflows/publish-package.yml, which builds a wheel and sdist with uv build and uploads both to PyPI via trusted publishing. Configure the trusted publisher on PyPI for this repository before your first release.