Skip to main content

daft-qdrant

Community extension for Daft to write vector embeddings and their payloads into Qdrant collections.

Installation

pip install daft-qdrant

Quick start

import daft
import daft_qdrant  # registers DataFrame.write_qdrant

df = daft.from_pydict({
    "id": [1, 2, 3],
    "vector": [[0.1, 0.2, 0.3], [0.4, 0.5, 0.6], [0.7, 0.8, 0.9]],
    "label": ["cat", "dog", "bird"],
})

df.write_qdrant("my-collection", url="http://localhost:6333")

The target collection must exist before writing. Each row becomes a Qdrant point:

  • id column → point id (unsigned integer or UUID string)
  • vector column → point vector (list of floats, or dict for named vectors)
  • all other columns → point payload

Embedding pipeline example

import os
import daft
import daft_qdrant
from daft.functions import monotonically_increasing_id
from daft.functions.ai import embed_text
from qdrant_client import QdrantClient, models

url = "http://localhost:6333"
vector_size = 768

QdrantClient(url=url).create_collection(
    "daft-qdrant-example",
    vectors_config=models.VectorParams(size=vector_size, distance=models.Distance.COSINE),
)

(
    daft.read_huggingface("Open-Orca/OpenOrca")
    .limit(100)
    .with_column(
        "vector",
        embed_text(daft.col("response"), provider="sentence_transformers", model="BAAI/bge-base-en-v1.5"),
    )
    .with_column("id", monotonically_increasing_id())
    .write_qdrant("daft-qdrant-example", url=url)
)

Routing rows to multiple collections

Pass a Daft expression as collection_name to route rows to different collections based on a column value:

df.write_qdrant(daft.col("collection"), url="http://localhost:6333")

Column remapping

Use id_column and vector_column to map differently named columns to the required id and vector roles:

df.write_qdrant(
    "my-collection",
    url="http://localhost:6333",
    id_column="doc_id",
    vector_column="embedding",
)

Links

Metadata

Release files for daft-qdrant 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for daft-qdrant 0.2.0
File Size Uploaded Provenance
daft_qdrant-0.2.0.tar.gz 5.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for daft-qdrant 0.2.0
File Interpreter ABI Platform
daft_qdrant-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / daft_qdrant-0.2.0.tar.gz

Download URL daft_qdrant-0.2.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d9f97135c974db74176d4dbbc82af57f04ba4eabf9373a91c25b6b545b3f8ccc
BLAKE2b-256 checksum
How to use checksums
ee679b5183e7dc7bc228e95e452e0d75e1c23634e0950c85ad29551f0a680b42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / daft_qdrant-0.2.0-py3-none-any.whl

Download URL daft_qdrant-0.2.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d660352dd492d7f8b31c5de5f57258d6c79dfca96cff728f7474c4d8fc7c7cf
BLAKE2b-256 checksum
How to use checksums
17946f79cbda90e5ac4f21df079a84f13dbb3fa28beb2bbc78f8670a8ff2ba70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for daft-qdrant 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page