This client is deprecated, please use https://github.com/qdrant/qdrant_client instead
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload).
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.1.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python >= 3.5
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/qdrant/qdrant_python_client.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/qdrant/qdrant_python_client.git
)
Then import the package:
import qdrant_openapi_client
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import qdrant_openapi_client
Please follow the installation procedure and then run the following:
import time
import qdrant_openapi_client
from pprint import pprint
from qdrant_openapi_client.api import collections_api
from qdrant_openapi_client.model.error_response import ErrorResponse
from qdrant_openapi_client.model.inline_response200 import InlineResponse200
from qdrant_openapi_client.model.inline_response2001 import InlineResponse2001
from qdrant_openapi_client.model.inline_response2002 import InlineResponse2002
from qdrant_openapi_client.model.storage_ops import StorageOps
# Defining the host is optional and defaults to http://localhost:6333
# See configuration.py for a list of all supported configuration parameters.
configuration = qdrant_openapi_client.Configuration(
host = "http://localhost:6333"
)
# Enter a context with an instance of the API client
with qdrant_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = collections_api.CollectionsApi(api_client)
name = "name_example" # str | Name of the collection to retrieve
try:
# Get information about existing collection
api_response = api_instance.get_collection(name)
pprint(api_response)
except qdrant_openapi_client.ApiException as e:
print("Exception when calling CollectionsApi->get_collection: %s\n" % e)
All URIs are relative to http://localhost:6333
Class | Method | HTTP request | Description |
---|---|---|---|
CollectionsApi | get_collection | GET /collections/{name} | Get information about existing collection |
CollectionsApi | get_collections | GET /collections | Get list of existing collections |
CollectionsApi | update_collections | POST /collections | Perform update operation on collections |
PointsApi | get_point | GET /collections/{name}/points/{id} | Retrieve point by id |
PointsApi | get_points | POST /collections/{name}/points | Retrieve points by ids |
PointsApi | search_points | POST /collections/{name}/points/search | Search points |
PointsApi | update_points | POST /collections/{name} | Update points in collection |
- AliasOperations
- AliasOperationsAnyOf
- AliasOperationsAnyOf1
- AliasOperationsAnyOf1DeleteAlias
- AliasOperationsAnyOf2
- AliasOperationsAnyOf2RenameAlias
- AliasOperationsAnyOfCreateAlias
- CollectionDescription
- CollectionInfo
- CollectionUpdateOperations
- CollectionsResponse
- Condition
- ConditionAnyOf
- ConditionAnyOf1
- ConditionAnyOf2
- ConditionAnyOf3
- ConditionAnyOf4
- Distance
- ErrorResponse
- ErrorResponseStatus
- Filter
- GeoBoundingBox
- GeoPoint
- Indexes
- IndexesAnyOf
- IndexesAnyOf1
- IndexesAnyOf1Options
- InlineResponse200
- InlineResponse2001
- InlineResponse2002
- InlineResponse2003
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- Match
- PayloadInterface
- PayloadInterfaceAnyOf
- PayloadInterfaceAnyOf1
- PayloadInterfaceAnyOf2
- PayloadInterfaceAnyOf3
- PayloadOps
- PayloadOpsAnyOf
- PayloadOpsAnyOf1
- PayloadOpsAnyOf1DeletePayload
- PayloadOpsAnyOf2
- PayloadOpsAnyOf2ClearPayload
- PayloadOpsAnyOfSetPayload
- PayloadType
- PayloadTypeAnyOf
- PayloadTypeAnyOf1
- PayloadTypeAnyOf2
- PayloadTypeAnyOf3
- PayloadVariantForDouble
- PayloadVariantForGeoPoint
- PayloadVariantForInt64
- PayloadVariantForString
- PointInsertOps
- PointInsertOpsAnyOf
- PointInsertOpsAnyOf1
- PointInsertOpsAnyOfBatch
- PointOps
- PointOpsAnyOf
- PointOpsAnyOf1
- PointOpsAnyOf1DeletePoints
- PointRequest
- PointStruct
- Range
- Record
- ScoredPoint
- SearchParams
- SearchParamsAnyOf
- SearchParamsAnyOfHnsw
- SearchRequest
- SegmentConfig
- StorageOps
- StorageOpsAnyOf
- StorageOpsAnyOf1
- StorageOpsAnyOf2
- StorageOpsAnyOf2ChangeAliases
- StorageOpsAnyOfCreateCollection
- StorageType
- StorageTypeAnyOf
- StorageTypeAnyOf1
- UpdateResult
- UpdateStatus
All endpoints do not require authorization.
If the OpenAPI document is large, imports in qdrant_openapi_client.apis and qdrant_openapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1: Use specific imports for apis and models like:
from qdrant_openapi_client.api.default_api import DefaultApi
from qdrant_openapi_client.model.pet import Pet
Solution 1: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
import qdrant_openapi_client
from qdrant_openapi_client.apis import *
from qdrant_openapi_client.models import *