Skip to main content

Dagster integration with chroma

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dagster_chroma-0.0.5.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dagster_chroma-0.0.5-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file dagster_chroma-0.0.5.tar.gz.

File metadata

  • Download URL: dagster_chroma-0.0.5.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for dagster_chroma-0.0.5.tar.gz
Algorithm Hash digest
SHA256 6c4029d68bd57c54228e1029bbb5f071ce3b50f15aeeda90d634ae17ddfbaf3a
MD5 105afd89c51d8efbe344dd1206620eb8
BLAKE2b-256 71688dc6ebc514f12203af073acace24257016c256218982225aaad79a5e0fad

See more details on using hashes here.

File details

Details for the file dagster_chroma-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: dagster_chroma-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for dagster_chroma-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 695a524c740db097dd707fad01fe815a637abe817856b9259fc8f0b76a5fd2c6
MD5 733465ecb5b65b538e3c56421c79f31d
BLAKE2b-256 710d35b6d0c8aba9e52bde18844615b2160a25ce6c7118d696703ddad6d8cddd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page