Skip to main content

Dagster integration with Weaviate

Project description

dagster-weaviate

A dagster module that provides integration with Weaviate (both Cloud and Self-Hosted Weaviate instances).

Installation

The dagster_weaviate 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-weaviate

Example Usage (Local Weaviate Instance)

(Based on the Weaviate Quickstart Guide (Local))

from dagster import Definitions, asset
from dagster_weaviate import WeaviateResource, LocalConfig

@asset
def my_table(weaviate: WeaviateResource):
    with weaviate.get_client() as weaviate_client:
        questions = weaviate_client.collections.get("Question")
        questions.query.near_text(query="biology", limit=2)

defs = Definitions(
    assets=[my_table],
    resources={
        "weaviate": WeaviateResource(
            connection_config=LocalConfig(
                host="192.168.0.10",
                port=8080,
            )
        ),
    },
)

Example Usage (Weaviate Cloud Instance)

Based on the Weaviate Cloud Quickstart Guide

from dagster import Definitions, asset
from dagster_weaviate import WeaviateResource, CloudConfig

@asset
def my_table(weaviate: WeaviateResource):
    with weaviate.get_client() as weaviate_client:
        questions = weaviate_client.collections.get("Question")
        questions.query.near_text(query="biology", limit=2)

defs = Definitions(
    assets=[my_table],
    resources={
        "weaviate": WeaviateResource(
            connection_config=CloudConfig(
                cluster_url=wcd_url
            ),
            auth_credentials={
                "api_key": wcd_apikey
            },
            headers={
                "X-Cohere-Api-Key": cohere_apikey,
            }
        ),
    },
)

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_weaviate-0.0.3.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

dagster_weaviate-0.0.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file dagster_weaviate-0.0.3.tar.gz.

File metadata

  • Download URL: dagster_weaviate-0.0.3.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for dagster_weaviate-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e02e3f6fd21649b56a095a065991394170665b71a6f0c3cc6d46c0029f0ad4c6
MD5 ec9b6040a2f55409a973a5f858bf5982
BLAKE2b-256 db94877d6203d200da358574e00db00dacaced33887900c03f815b6a68e0ee71

See more details on using hashes here.

File details

Details for the file dagster_weaviate-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for dagster_weaviate-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cd63ce24a3cf4f419e38709a5c8089df11aeaaa2fd2da59925f7acc6bc26f927
MD5 3fa69e17e902214d7ac66292d515d5cb
BLAKE2b-256 19adcd82347889960586369cb8671d8f3bf0e5d0af91e6beff09b2acf8e597fd

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