DBT Enexis Python Postgres adapter - Run python scripts from any dbt project.
Project description
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 comming soon
Features
- Run Python scripts as dbt models
- Python Docs string are automatically added as descriptin in docs (more doc improvement soon)
- Python models are fully typed
- Currently support for both pandas and polars dataframes (more comming soon)
- Blazing performance using connectorx, asyncpg
- Seamless integration with PostgreSQL databases (more comming soon)
Installation
Install using uv (recommended):
uv add depp
Or using pip:
pip install 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/my_python_model.py
import polars as pl
def model(dbt, session):
dbt.config(library="polars")
# Your Python logic here
df = pl.DataFrame({'column1': [1, 2, 3], 'column2': ['a', 'b', 'c']})
return df
dbt run!
Development
This project uses uv for dependency management:
# Install dependencies
uv sync
# Run tests
uv run pytest
# Build package
uv build
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbt_depp-0.1.3.tar.gz.
File metadata
- Download URL: dbt_depp-0.1.3.tar.gz
- Upload date:
- Size: 102.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc9325c5edfedc14d6cfbccc4b1f103d529dcb9abebbd1720f2a65b5c61ea3bc
|
|
| MD5 |
6318b3c77ee165f48ada34a5d1e2d4f9
|
|
| BLAKE2b-256 |
d325b514111fd0124063c896e59f4c2570ae654c6e2c3ac9962455bdd3685092
|
Provenance
The following attestation bundles were made for dbt_depp-0.1.3.tar.gz:
Publisher:
publish.yml on YassinCh/depp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_depp-0.1.3.tar.gz -
Subject digest:
bc9325c5edfedc14d6cfbccc4b1f103d529dcb9abebbd1720f2a65b5c61ea3bc - Sigstore transparency entry: 562168732
- Sigstore integration time:
-
Permalink:
YassinCh/depp@b0ee0c35fbff74c9a16baef86a3f48a9ec57e43b -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/YassinCh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b0ee0c35fbff74c9a16baef86a3f48a9ec57e43b -
Trigger Event:
release
-
Statement type:
File details
Details for the file dbt_depp-0.1.3-py3-none-any.whl.
File metadata
- Download URL: dbt_depp-0.1.3-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed1a22494a5bec85c1c700a869c1c5ae687e9d015017492e524e479eeed02bff
|
|
| MD5 |
8fec16fcc9b47675b4c5479682bb0a2e
|
|
| BLAKE2b-256 |
ee3a3bb0b2d96f27e72fa1fa2663a4b6512c9552bd24d3ebcb343a72703722fb
|
Provenance
The following attestation bundles were made for dbt_depp-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on YassinCh/depp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dbt_depp-0.1.3-py3-none-any.whl -
Subject digest:
ed1a22494a5bec85c1c700a869c1c5ae687e9d015017492e524e479eeed02bff - Sigstore transparency entry: 562168741
- Sigstore integration time:
-
Permalink:
YassinCh/depp@b0ee0c35fbff74c9a16baef86a3f48a9ec57e43b -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/YassinCh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b0ee0c35fbff74c9a16baef86a3f48a9ec57e43b -
Trigger Event:
release
-
Statement type: