Skip to main content

ray-qdrant

Write Ray datasets to Qdrant in parallel.

Installation

pip install ray-qdrant

Requires Python 3.10+, Ray 2.40+, and Qdrant 1.16+.

Usage

import numpy as np
import ray
import ray_qdrant

ds = ray.data.range(1_000).map_batches(
    lambda batch: {
        "id": batch["id"],
        "vector": np.random.rand(len(batch["id"]), 384),
        "text": [f"document {i}" for i in batch["id"]],
    }
)

ray_qdrant.write_qdrant(ds, url="http://localhost:6333", collection="docs")

Each row becomes a point. By default, the id column holds the point ID (an unsigned integer or UUID) and the vector column holds the vector. Use id_column and vector_column to read them from other columns. Rows with a null ID are skipped, and every other column goes into the payload. Writes are upserts, and a missing collection is created with the vector size of the data.

Named vectors

ray_qdrant.write_qdrant(
    ds, url="http://localhost:6333", collection="docs", vector_name="dense"
)

Parameters

Parameter Default Description
url required URL of the Qdrant server.
collection None Collection to write to. Set this or collection_column.
collection_column None Column with each row's collection name. Not written to the payload.
api_key $QDRANT_API_KEY API key.
id_column "id" Column of point IDs.
vector_column "vector" Column of vectors.
vector_name None Named vector to write to. Defaults to the unnamed vector.
batch_size 256 Maximum points per upsert request.
distance "Cosine" Distance metric for new collections: "Cosine", "Euclid", "Dot", or "Manhattan".
client_kwargs None Extra arguments for qdrant_client.QdrantClient, like {"prefer_grpc": True}.
ray_remote_args None Arguments passed to ray.remote for the write tasks.
concurrency None Maximum number of concurrent write tasks.

License

Apache 2.0

Metadata

Release files for ray-qdrant 0.1.1

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

Source distribution (sdist)

Source distribution for ray-qdrant 0.1.1
File Size Uploaded Provenance
ray_qdrant-0.1.1.tar.gz 13.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ray-qdrant 0.1.1
File Interpreter ABI Platform
ray_qdrant-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.1 kB

Release files / ray_qdrant-0.1.1.tar.gz

Download URL ray_qdrant-0.1.1.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bfda2a75b13374e71f4bdb23251315b1c0e42fcf5d5c97c01c6466d1acd93f26
BLAKE2b-256 checksum
How to use checksums
9bc1260ae9038f88fef764063ec23770caa22a239a7668007c8603fa67ef13c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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 / ray_qdrant-0.1.1-py3-none-any.whl

Download URL ray_qdrant-0.1.1-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4eaa85f98809bded2a2933d539d89636143e21f41c04b6bb9301e36b07974664
BLAKE2b-256 checksum
How to use checksums
02d895fe9a9c3bafb02cb06084b6274ca83807e5c05e11d0b9d05c89ecdc0113
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}

Security for ray-qdrant 0.1.1

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.

Release history Release notifications | RSS feed

This release

0.1.1 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