dagster-chroma
A dagster module that provides integration with chroma. Both HTTP connections, and local (filesystem-based) connections are supported.
Installation
The dagster_chroma module is available as a PyPI package - install with your preferred python
environment manager (We recommend uv).
source .venv/bin/activate
uv pip install dagster-chroma
Example Usage (Local Chroma Instance)
(Based on the Chroma getting started guide)
import os
from dagster import Definitions, asset
from dagster_chroma import ChromaResource, LocalConfig, HttpConfig
@asset
def my_table(chroma: ChromaResource):
with chroma.get_client() as chroma_client:
collection = chroma_client.create_collection("fruits")
collection.add(
documents=[
"This is a document about oranges",
"This is a document about pineapples",
"This is a document about strawberries",
"This is a document about cucumbers"],
ids=["oranges", "pineapples", "strawberries", "cucumbers"],
)
results = collection.query(
query_texts=["hawaii"],
n_results=1,
)
defs = Definitions(
assets=[my_table],
resources={
"chroma": ChromaResource(
connection_config=
LocalConfig(persistence_path="./chroma") if os.getenv("DEV") else
HttpConfig(host="192.168.0.10", port=8000)
),
}
)
Development
The Makefile provides the tools required to test and lint your local installation.
make test
make ruff
make check
Release files for dagster-chroma 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dagster_chroma-0.0.5.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dagster_chroma-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.0 kB
Release files / dagster_chroma-0.0.5.tar.gz
| Download URL | dagster_chroma-0.0.5.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c4029d68bd57c54228e1029bbb5f071ce3b50f15aeeda90d634ae17ddfbaf3a
|
|
BLAKE2b-256 checksum How to use checksums |
71688dc6ebc514f12203af073acace24257016c256218982225aaad79a5e0fad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / dagster_chroma-0.0.5-py3-none-any.whl
| Download URL | dagster_chroma-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
695a524c740db097dd707fad01fe815a637abe817856b9259fc8f0b76a5fd2c6
|
|
BLAKE2b-256 checksum How to use checksums |
710d35b6d0c8aba9e52bde18844615b2160a25ce6c7118d696703ddad6d8cddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|