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:
idcolumn → point id (unsigned integer or UUID string)vectorcolumn → 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)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| daft_qdrant-0.2.0.tar.gz | 5.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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.