Skip to main content

qdrant-tensr-client — Lightweight Python SDK for the Qdrant Tensr Dev external API

Project description

qdrant-tensr-dev

Lightweight Python SDK for the Qdrant Tensr Dev external API.

  • Zero required dependencies — uses httpx, requests, or stdlib urllib in that order
  • Single file — copy qdrant_tensr_dev.py or install via pip
  • Mirrors the Qdrant client API — familiar method names (upsert, search, scroll, …)

Install

pip install qdrant-tensr-dev
# optional: bring your own HTTP library
pip install qdrant-tensr-dev[httpx]
pip install qdrant-tensr-dev[requests]

Quick start

from qdrant_tensr_dev import TensrClient

client = TensrClient(
    base_url="https://your-dashboard-host",
    api_key="YOUR_API_KEY",          # from Dashboard → Groups → API Keys
)

# Create a new collection
col = client.create_collection("my-collection", vector_size=1536, distance="cosine")
# {"id": "...", "name": "my-collection", "vector_size": 1536, "distance": "cosine"}

# List all collections in your group
cols = client.list_collections()
print(cols)
# {"group_id": "...", "collections": [{"name": "...", "vector_size": 384, "distance": "Cosine"}, ...]}

# Get detailed info for one collection
info = client.get_collection("my-collection")

# Upsert vectors
client.upsert("my-collection", points=[
    {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "vector": [0.1, 0.2, 0.3],
        "payload": {"text": "hello world", "source": "docs"},
    },
])

# Nearest-neighbour search
results = client.search("my-collection", vector=[0.1, 0.2, 0.3], limit=5)
for hit in results:
    print(hit["score"], hit["payload"])

# Cross-collection search across every collection in your group at once
hits = client.search_all(vector=[0.1, 0.2, 0.3], limit=10)
for hit in hits:
    print(hit["collection"], hit["score"], hit["payload"])

# Scroll (paginate) all points
offset = None
while True:
    page = client.scroll("my-collection", limit=100, offset=offset)
    for pt in page["points"]:
        print(pt["id"], pt["payload"])
    offset = page["next_offset"]
    if offset is None:
        break

# Get a single point
pt = client.get_point("my-collection", "550e8400-e29b-41d4-a716-446655440001")

# Count points
total = client.count("my-collection")

# Delete points
client.delete("my-collection", ids=["550e8400-e29b-41d4-a716-446655440001"])

API reference

Method Description
create_collection(name, vector_size, distance) Create a new collection and add it to your group
list_collections() List all active collections in your group
get_collection(name) Get metadata + live stats for a collection
upsert(collection, points) Insert or update points
delete(collection, ids) Delete points by ID
get_point(collection, point_id) Retrieve a single point
scroll(collection, ...) Page through all points
count(collection) Count total points
search(collection, vector, ...) Nearest-neighbour search (single collection)
search_all(vector, ...) Cross-collection search across all group collections

All methods raise TensrError(status_code, detail) on HTTP errors.

CLI smoke-test

python -m qdrant_tensr_dev --url https://your-host --key YOUR_KEY

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

qdrant_tensr_dev-0.3.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

qdrant_tensr_dev-0.3.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file qdrant_tensr_dev-0.3.1.tar.gz.

File metadata

  • Download URL: qdrant_tensr_dev-0.3.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.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}

File hashes

Hashes for qdrant_tensr_dev-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b5e4d28ddb10fefb571ad7eb38b59c93a0038c705cfbd0e72915376ae14bffa3
MD5 d1e698883af9e055f0aae8c2e3b5a0c1
BLAKE2b-256 d0aa8c7be6faa3df8c26170dc11c1eb53cc68abc8f3d85582dfca5d1c602da5e

See more details on using hashes here.

File details

Details for the file qdrant_tensr_dev-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: qdrant_tensr_dev-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.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}

File hashes

Hashes for qdrant_tensr_dev-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a3da3a8823854d3ee41127251677c44886848a6c3a84305e5e52a7f6f0d50c1
MD5 e6b3bd067207a50ae699c287ad565815
BLAKE2b-256 9b6f951d53b41f72a1b7c3331447646c391336a959ce452e7a762c6fd4ab7f19

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