Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

Qdrant Python client, generated from OpenAPI specification (with minor fixes)

Notifications You must be signed in to change notification settings

qdrant/qdrant_python_client

Repository files navigation

WARNING

This client is deprecated, please use https://github.com/qdrant/qdrant_client instead

qdrant-openapi-client

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

Requirements.

Python >= 3.5

Installation & Usage

pip install

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

Setuptools

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

Getting Started

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)

Documentation for API Endpoints

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

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

andrey@vasnetsov.com

Notes for Large OpenAPI documents

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 *

About

Qdrant Python client, generated from OpenAPI specification (with minor fixes)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published