Skip to main content

Client library for the Qdrant vector search engine

Project description

Python Qdrant client library

Client library for the Qdrant vector search engine.

Library contains type definitions for all Qdrant API and allows to make both Sync and Async requests.

Pydantic is used for describing request models and httpx for handling http queries.

Client allows calls for all Qdrant API methods directly. It also provides some additional helper methods for frequently required operations, e.g. initial collection uploading.

Installation

pip install qdrant-client

Examples

Instance a client

from qdrant_client import QdrantClient

client = QdrantClient(host="localhost", port=6333)

Create a new collection

client.recreate_collection(
    collection_name="my_collection",
    vector_size=100
)

Get info about created collection

my_collection_info = client.http.collections_api.get_collection("my_collection")
print(my_collection_info.dict())

Search for similar vectors

query_vector = np.random.rand(100)
hits = client.search(
    collection_name="my_collection",
    query_vector=query_vector,
    query_filter=None,  # Don't use any filters for now, search across all indexed points
    append_payload=True,  # Also return a stored payload for found points
    top=5  # Return 5 closest points
)

Project details


Release history Release notifications | RSS feed

This version

0.1.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qdrant_client-0.1.2.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

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

qdrant_client-0.1.2-py3-none-any.whl (75.7 kB view details)

Uploaded Python 3

File details

Details for the file qdrant_client-0.1.2.tar.gz.

File metadata

  • Download URL: qdrant_client-0.1.2.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/5.8.0-7630-generic

File hashes

Hashes for qdrant_client-0.1.2.tar.gz
Algorithm Hash digest
SHA256 039869af7684b6a118d336758e1bae03e2ed75d7061790421e0e2a613879eae8
MD5 d2b30719a96879f5100ea3cbff79489a
BLAKE2b-256 933aa7157172a6687757c4127033fe5a8aa4213cb9ee941546787fb6ea07bf98

See more details on using hashes here.

File details

Details for the file qdrant_client-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: qdrant_client-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 75.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.0 Linux/5.8.0-7630-generic

File hashes

Hashes for qdrant_client-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dfc5e1cff138e994ff905b0b1bee22791b43d80ab2e24cdc13f79e779beb6648
MD5 5e892f4ef2190ba9f97cbd86a2f9aeec
BLAKE2b-256 c3f947e2babb17f8ca1b2186a82666d5460106dc44c503facde5f0ec3e40afc9

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