qdrant-client
qdrant/qdrant-client
Python client for Qdrant vector search engine
Overview
Python library with type definitions and sync/async API calls for Qdrant, a vector search engine. It supports local mode without needing to run the server.
Categories
Tags
Similar tools
meilisearch
meilisearch/meilisearch
A lightning-fast search engine API bringing AI-powered hybrid search to your sites and applications.
milvus
milvus-io/milvus
High-performance vector database for scalable vector ANN search
qdrant
qdrant/qdrant
High-performance, massive-scale Vector Database and Search Engine for AI applications.
pgvector
pgvector/pgvector
Open-source vector similarity search for Postgres
weaviate
weaviate/weaviate
Open-source vector database for semantic search at scale
self-hosted-ai-starter-kit
n8n-io/self-hosted-ai-starter-kit
Self-hosted AI Starter Kit
Install
pip install qdrant-clientREADME
Python Client library for the Qdrant vector search engine.
Python Qdrant Client
Client library and SDK for the Qdrant vector search engine.
Library contains type definitions for all Qdrant API and allows to make both Sync and Async requests.
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.
See QuickStart for more details!
Installation
pip install qdrant-client
Features
- Type hints for all API methods
- Local mode - use same API without running server
- REST and gRPC support
- Minimal dependencies
- Extensive Test Coverage
Local mode
Python client allows you to run same code in local mode without running Qdrant server.
Simply initialize client like this:
from qdrant_client import QdrantClient
client = QdrantClient(":memory:")
# or
client = QdrantClient(path="path/to/db") # Persists changes to disk
Local mode is useful for development, prototyping and testing.
- You can use it to run tests in your CI/CD pipeline.
- Run it in Colab or Jupyter Notebook, no extra dependencies required. See an example
- When you need to scale, simply switch to server mode.
Connect to Qdrant server
To connect to Qdrant server, simply specify host and port:
from qdrant_client import QdrantClient
client = QdrantClient(host="localhost", port=6333)
# or
client = QdrantClient(url="http://localhost:6333")
You can run Qdrant server locally with docker:
docker run -p 6333:6333 qdrant/qdrant:latest
See more launch options in Qdrant repository.
Connect to Qdrant cloud
You can register and use Qdrant Cloud to get a free tier account with 1GB RAM.
Once you have your cluster and API key, you can connect to it like this:
from qdrant_client import QdrantClient
qdrant_client = QdrantClient(
url="https://xxxxxx-xxxxx-xxxxx-xxxx-xxxxxxxxx.us-east.aws.cloud.qdrant.io:6333",
api_key="<your-api-key>",
)
Inference API
Qdrant Client has Inference API that allows to seamlessly create embeddings and use them in Qdrant. Inference API can be used locally with FastEmbed or remotely with models available in Qdrant Cloud.
Local Inference with FastEmbed
pip install qdrant-client[fastembed