qdrant-clients-sdk

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Qdrant Clients SDK

Qdrant 客户端SDK

Qdrant has the following officially supported client SDKs:
Qdrant官方支持以下客户端SDK:

API Reference

API 参考

All interaction with Qdrant can happen through the REST API or gRPC API. We recommend using the REST API if you are using Qdrant for the first time or working on a prototype.
所有与Qdrant的交互都可以通过REST API或gRPC API完成。如果你是首次使用Qdrant或者正在开发原型,我们推荐使用REST API。

Code examples

代码示例

To obtain code examples for a specific client and use case, you can send a search request to the library of curated code snippets for the Qdrant client.
bash
curl -X GET "https://snippets.qdrant.tech/search?language=python&query=how+to+upload+points"
Available languages:
python
,
typescript
,
rust
,
java
,
go
,
csharp
Response example:
markdown
undefined
要获取特定客户端和使用场景的代码示例,你可以向Qdrant客户端精选代码片段库发送搜索请求。
bash
curl -X GET "https://snippets.qdrant.tech/search?language=python&query=how+to+upload+points"
支持的语言:
python
,
typescript
,
rust
,
java
,
go
,
csharp
响应示例:
markdown
undefined

Snippet 1

片段 1

Uploads multiple vector-embedded points to a Qdrant collection using the Python qdrant_client (PointStruct) with id, payload (e.g., color), and a 3D-like vector for similarity search. It supports parallel uploads (parallel=4) and a retry policy (max_retries=3) for robust indexing. The operation is idempotent: re-uploading with the same id overwrites existing points; if ids aren’t provided, Qdrant auto-generates UUIDs.
client.upload_points( collection_name="{collection_name}", points=[ models.PointStruct( id=1, payload={ "color": "red", }, vector=[0.9, 0.1, 0.1], ), models.PointStruct( id=2, payload={ "color": "green", }, vector=[0.1, 0.9, 0.1], ), ], parallel=4, max_retries=3, )

Default response format is markdown, if snippet output is required in JSON format, you can add `&format=json` to the query string.
使用Python qdrant_client (PointStruct) 向Qdrant集合上传多个带向量嵌入的点,包含id、payload(例如颜色)以及用于相似性搜索的类3D向量。它支持并行上传(parallel=4)和重试策略(max_retries=3),保障索引稳定性。该操作是幂等的:使用相同id重新上传会覆盖现有点;如果未提供id,Qdrant会自动生成UUID。
client.upload_points( collection_name="{collection_name}", points=[ models.PointStruct( id=1, payload={ "color": "red", }, vector=[0.9, 0.1, 0.1], ), models.PointStruct( id=2, payload={ "color": "green", }, vector=[0.1, 0.9, 0.1], ), ], parallel=4, max_retries=3, )

默认响应格式为markdown,如果你需要JSON格式的片段输出,可以在查询字符串中添加`&format=json`参数。