DEPP - DBT Python Postgres Adapter
This package support for running python models in dbt for postgres directly within your dbt project Inspired on dbt-fal but made to be both extremely high performance and fully typed Also supports polars dataframe besides pandas and more are coming soon
Features
- Run Python scripts as dbt models - Write Python logic directly in your dbt project
- Fully typed Python models - Complete type safety with IDE support (see typing docs)
- Multiple DataFrame libraries - Support for both pandas and Polars dataframes (more comming soon)
- Auto-generated documentation - Python docstrings automatically become model descriptions in dbt docs
- High performance - Blazing fast execution using connectorx and asyncpg
- PostgreSQL integration - Seamless integration with PostgreSQL databases
Installation
Install using uv (recommended):
uv add dbt-debb
Or using pip:
pip install dbt-depp
Quick Start
- Add to your
profiles.yml: Make sure to both add a db_profile with all your details and add your database and schema
your_project:
target: dev
outputs:
dev:
type: depp
db_profile: dev_postgres
database: example_db
schema: test
dev_postgres:
type: postgres
host: localhost
user: postgres
password: postgres
port: 5432
database: example_db
schema: test
threads: 1
- Create Python models in your dbt project:
# models/customer_analysis.py
"""Analyze customer purchase patterns using Polars."""
import polars as pl
from dbt.adapters.depp.typing import PolarsDbt, SessionObject
def model(dbt: PolarsDbt, session: SessionObject) -> pl.DataFrame:
# Reference existing models with full type safety
customers_df = dbt.ref("customers")
orders_df = dbt.ref("orders")
# Perform analysis using Polars
result = (
customers_df
.join(orders_df, on="customer_id", how="inner")
.group_by("customer_region")
.agg([
pl.col("order_amount").sum().alias("total_revenue"),
pl.col("customer_id").n_unique().alias("unique_customers"),
pl.col("order_amount").mean().alias("avg_order_value")
])
.sort("total_revenue", descending=True)
)
return result
dbt run!
Development
This project uses uv for dependency management:
# Install dependencies
uv sync
# Run tests
uv run pytest
# Build package
uv build
Documentation
- Getting Started Guide - Complete setup guide including profiles.yml configuration and first Python models
- Type Safety Guide - Complete guide to using DEPP's type system for better IDE support and code safety
Requirements
- Python >= 3.12
- dbt-core >= 1.10.0
- PostgreSQL database
License
This project is open source and available under the MIT License.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for dbt-depp 0.4.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbt_depp-0.4.8.tar.gz | 199.7 kB | With provenance | Details for dbt_depp-0.4.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbt_depp-0.4.8-py3-none-any.whl | Python 3 | none | any | Details for dbt_depp-0.4.8-py3-none-any.whl |
Total release size: 251.5 kB
Release files / dbt_depp-0.4.8.tar.gz
| Download URL | dbt_depp-0.4.8.tar.gz |
|---|---|
| Size | 199.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faca21ce2c19582b0e94d820d5a61ceca47898c4e0f9d306bf2966677710d5dc
|
|
BLAKE2b-256 checksum How to use checksums |
a742ba6acfd9e0bee64b91435c37e8d929757365493448725d286d7d166b23ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 2, 2026.
Transparency logRelease files / dbt_depp-0.4.8-py3-none-any.whl
| Download URL | dbt_depp-0.4.8-py3-none-any.whl |
|---|---|
| Size | 51.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2cc51718ce5edba5ca7e91da9d37ccfc7f9069ce6418a0b6b26756bf59ccd78
|
|
BLAKE2b-256 checksum How to use checksums |
4519da0c27c892fdc92d23df50d390040c46d44008d2bb251ce1921e3d1d478c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 2, 2026.
Transparency logSecurity for dbt-depp 0.4.8
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for dbt_depp-0.4.8.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 Jun 2, 2026.
Transparency logA 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.