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.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 ray-qdrant 0.1.0
File Size Uploaded Provenance
ray_qdrant-0.1.0.tar.gz 13.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 28.0 kB

Release files / ray_qdrant-0.1.0.tar.gz

Download URL ray_qdrant-0.1.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ad2b5e26f6e07d72401fca47001ada405f24745f8a1ba9bf60303d1fe9ed2fc3
BLAKE2b-256 checksum
How to use checksums
e86e3f2a9fdfbcaf7fac73febdd517fde84805ce6db2a77c4f0b18ad214acbb3
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.0-py3-none-any.whl

Download URL ray_qdrant-0.1.0-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf36b109c463e57c7aa7ebee1800cb87c4811a59346186aa55ea626d3d24b37e
BLAKE2b-256 checksum
How to use checksums
697c49810d1521d7d573d650add2b14405d83242af424eb0b6759fc2378ff509
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.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.

Release history Release notifications | RSS feed

This release

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