openapi client
This commit is contained in:
parent
4a0699d2a6
commit
aa9d0189ba
|
@ -2,6 +2,7 @@
|
||||||
<module type="PYTHON_MODULE" version="4">
|
<module type="PYTHON_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager">
|
<component name="NewModuleRootManager">
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/qdrant_client" isTestSource="false" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Poetry (qdrant_demo)" jdkType="Python SDK" />
|
<orderEntry type="jdk" jdkName="Poetry (qdrant_demo)" jdkType="Python SDK" />
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
|
Data: https://www.kaggle.com/yehyachali/top2k-books-with-descriptions
|
|
@ -0,0 +1,18 @@
|
||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
build: .
|
||||||
|
command: python manage.py runserver 0.0.0.0:8000
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
|
environment:
|
||||||
|
- QDRANT_HOST=qdrant
|
||||||
|
depends_on:
|
||||||
|
- qdrant
|
||||||
|
qdrant:
|
||||||
|
image: generall/qdrant:latest
|
||||||
|
ports:
|
||||||
|
- 6333:6333
|
||||||
|
volumes:
|
||||||
|
- ./data/qdarnt_storage:/qdrant/storage
|
File diff suppressed because it is too large
Load Diff
|
@ -6,11 +6,14 @@ authors = ["Andrey Vasnetsov <andrey@vasnetsov.com>"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "~3.8"
|
python = "~3.8"
|
||||||
tensorflow = "^2"
|
|
||||||
tensorflow-hub = "^0.10.0"
|
tensorflow-hub = "^0.10.0"
|
||||||
fastapi = "^0.61.2"
|
fastapi = "^0.61.2"
|
||||||
uvicorn = "^0.12.3"
|
uvicorn = "^0.12.3"
|
||||||
openapi-client = {path = "qdrant_client"}
|
#openapi-client = {path = "qdrant_client"}
|
||||||
|
qdrant-api-client = {path = "qdrant-api-client"}
|
||||||
|
sentence-transformers = "^0.3.9"
|
||||||
|
psutil = "^5.7.3"
|
||||||
|
nltk = "^3.5"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*$py.class
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
.Python
|
|
||||||
env/
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
downloads/
|
|
||||||
eggs/
|
|
||||||
.eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
|
|
||||||
# PyInstaller
|
|
||||||
# Usually these files are written by a python script from a template
|
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
||||||
*.manifest
|
|
||||||
*.spec
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
pip-delete-this-directory.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
htmlcov/
|
|
||||||
.tox/
|
|
||||||
.coverage
|
|
||||||
.coverage.*
|
|
||||||
.cache
|
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
|
||||||
*,cover
|
|
||||||
.hypothesis/
|
|
||||||
venv/
|
|
||||||
.venv/
|
|
||||||
.python-version
|
|
||||||
.pytest_cache
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
*.pot
|
|
||||||
|
|
||||||
# Django stuff:
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# Sphinx documentation
|
|
||||||
docs/_build/
|
|
||||||
|
|
||||||
# PyBuilder
|
|
||||||
target/
|
|
||||||
|
|
||||||
#Ipython Notebook
|
|
||||||
.ipynb_checkpoints
|
|
|
@ -1,24 +0,0 @@
|
||||||
# ref: https://docs.gitlab.com/ee/ci/README.html
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- test
|
|
||||||
|
|
||||||
.tests:
|
|
||||||
stage: test
|
|
||||||
script:
|
|
||||||
- pip install -r requirements.txt
|
|
||||||
- pip install -r test-requirements.txt
|
|
||||||
- pytest --cov=openapi_client
|
|
||||||
|
|
||||||
test-3.5:
|
|
||||||
extends: .tests
|
|
||||||
image: python:3.5-alpine
|
|
||||||
test-3.6:
|
|
||||||
extends: .tests
|
|
||||||
image: python:3.6-alpine
|
|
||||||
test-3.7:
|
|
||||||
extends: .tests
|
|
||||||
image: python:3.7-alpine
|
|
||||||
test-3.8:
|
|
||||||
extends: .tests
|
|
||||||
image: python:3.8-alpine
|
|
|
@ -1,23 +0,0 @@
|
||||||
# OpenAPI Generator Ignore
|
|
||||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
||||||
|
|
||||||
# Use this file to prevent files from being overwritten by the generator.
|
|
||||||
# The patterns follow closely to .gitignore or .dockerignore.
|
|
||||||
|
|
||||||
# As an example, the C# client generator defines ApiClient.cs.
|
|
||||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
||||||
#ApiClient.cs
|
|
||||||
|
|
||||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
||||||
#foo/*/qux
|
|
||||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
||||||
#foo/**/qux
|
|
||||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
||||||
#docs/*.md
|
|
||||||
# Then explicitly reverse the ignore rule for a single file:
|
|
||||||
#!docs/README.md
|
|
|
@ -1,208 +0,0 @@
|
||||||
.gitignore
|
|
||||||
.gitlab-ci.yml
|
|
||||||
.openapi-generator-ignore
|
|
||||||
.travis.yml
|
|
||||||
README.md
|
|
||||||
docs/CollectionDescription.md
|
|
||||||
docs/CollectionInfo.md
|
|
||||||
docs/CollectionUpdateOperations.md
|
|
||||||
docs/CollectionsApi.md
|
|
||||||
docs/CollectionsResponse.md
|
|
||||||
docs/Condition.md
|
|
||||||
docs/ConditionAnyOf.md
|
|
||||||
docs/ConditionAnyOf1.md
|
|
||||||
docs/ConditionAnyOf2.md
|
|
||||||
docs/ConditionAnyOf3.md
|
|
||||||
docs/ConditionAnyOf4.md
|
|
||||||
docs/Distance.md
|
|
||||||
docs/ErrorResponse.md
|
|
||||||
docs/ErrorResponseStatus.md
|
|
||||||
docs/Filter.md
|
|
||||||
docs/Indexes.md
|
|
||||||
docs/IndexesAnyOf.md
|
|
||||||
docs/IndexesAnyOf1.md
|
|
||||||
docs/IndexesAnyOf1Options.md
|
|
||||||
docs/InlineResponse200.md
|
|
||||||
docs/InlineResponse2001.md
|
|
||||||
docs/InlineResponse2002.md
|
|
||||||
docs/InlineResponse2003.md
|
|
||||||
docs/InlineResponse2004.md
|
|
||||||
docs/InlineResponse2005.md
|
|
||||||
docs/InlineResponse2006.md
|
|
||||||
docs/PayloadOps.md
|
|
||||||
docs/PayloadOpsAnyOf.md
|
|
||||||
docs/PayloadOpsAnyOf1.md
|
|
||||||
docs/PayloadOpsAnyOf1DeletePayload.md
|
|
||||||
docs/PayloadOpsAnyOf2.md
|
|
||||||
docs/PayloadOpsAnyOf2ClearPayload.md
|
|
||||||
docs/PayloadOpsAnyOfSetPayload.md
|
|
||||||
docs/PayloadType.md
|
|
||||||
docs/PayloadTypeAnyOf.md
|
|
||||||
docs/PayloadTypeAnyOf1.md
|
|
||||||
docs/PayloadTypeAnyOf2.md
|
|
||||||
docs/PayloadTypeAnyOf3.md
|
|
||||||
docs/PointOps.md
|
|
||||||
docs/PointOpsAnyOf.md
|
|
||||||
docs/PointOpsAnyOf1.md
|
|
||||||
docs/PointOpsAnyOf1DeletePoints.md
|
|
||||||
docs/PointRequest.md
|
|
||||||
docs/PointsApi.md
|
|
||||||
docs/Record.md
|
|
||||||
docs/ScoredPoint.md
|
|
||||||
docs/SearchParams.md
|
|
||||||
docs/SearchParamsAnyOf.md
|
|
||||||
docs/SearchParamsAnyOfHnsw.md
|
|
||||||
docs/SearchRequest.md
|
|
||||||
docs/SegmentConfig.md
|
|
||||||
docs/StorageOps.md
|
|
||||||
docs/StorageOpsAnyOf.md
|
|
||||||
docs/StorageOpsAnyOf1.md
|
|
||||||
docs/StorageOpsAnyOf2.md
|
|
||||||
docs/StorageOpsAnyOf2ChangeAliases.md
|
|
||||||
docs/StorageOpsAnyOfCreateCollection.md
|
|
||||||
docs/StorageType.md
|
|
||||||
docs/StorageTypeAnyOf.md
|
|
||||||
docs/StorageTypeAnyOf1.md
|
|
||||||
docs/UpdateResult.md
|
|
||||||
docs/UpdateStatus.md
|
|
||||||
git_push.sh
|
|
||||||
openapi_client/__init__.py
|
|
||||||
openapi_client/api/__init__.py
|
|
||||||
openapi_client/api/collections_api.py
|
|
||||||
openapi_client/api/points_api.py
|
|
||||||
openapi_client/api_client.py
|
|
||||||
openapi_client/apis/__init__.py
|
|
||||||
openapi_client/configuration.py
|
|
||||||
openapi_client/exceptions.py
|
|
||||||
openapi_client/model/collection_description.py
|
|
||||||
openapi_client/model/collection_info.py
|
|
||||||
openapi_client/model/collection_update_operations.py
|
|
||||||
openapi_client/model/collections_response.py
|
|
||||||
openapi_client/model/condition.py
|
|
||||||
openapi_client/model/condition_any_of.py
|
|
||||||
openapi_client/model/condition_any_of1.py
|
|
||||||
openapi_client/model/condition_any_of2.py
|
|
||||||
openapi_client/model/condition_any_of3.py
|
|
||||||
openapi_client/model/condition_any_of4.py
|
|
||||||
openapi_client/model/distance.py
|
|
||||||
openapi_client/model/error_response.py
|
|
||||||
openapi_client/model/error_response_status.py
|
|
||||||
openapi_client/model/filter.py
|
|
||||||
openapi_client/model/indexes.py
|
|
||||||
openapi_client/model/indexes_any_of.py
|
|
||||||
openapi_client/model/indexes_any_of1.py
|
|
||||||
openapi_client/model/indexes_any_of1_options.py
|
|
||||||
openapi_client/model/inline_response200.py
|
|
||||||
openapi_client/model/inline_response2001.py
|
|
||||||
openapi_client/model/inline_response2002.py
|
|
||||||
openapi_client/model/inline_response2003.py
|
|
||||||
openapi_client/model/inline_response2004.py
|
|
||||||
openapi_client/model/inline_response2005.py
|
|
||||||
openapi_client/model/inline_response2006.py
|
|
||||||
openapi_client/model/payload_ops.py
|
|
||||||
openapi_client/model/payload_ops_any_of.py
|
|
||||||
openapi_client/model/payload_ops_any_of1.py
|
|
||||||
openapi_client/model/payload_ops_any_of1_delete_payload.py
|
|
||||||
openapi_client/model/payload_ops_any_of2.py
|
|
||||||
openapi_client/model/payload_ops_any_of2_clear_payload.py
|
|
||||||
openapi_client/model/payload_ops_any_of_set_payload.py
|
|
||||||
openapi_client/model/payload_type.py
|
|
||||||
openapi_client/model/payload_type_any_of.py
|
|
||||||
openapi_client/model/payload_type_any_of1.py
|
|
||||||
openapi_client/model/payload_type_any_of2.py
|
|
||||||
openapi_client/model/payload_type_any_of3.py
|
|
||||||
openapi_client/model/point_ops.py
|
|
||||||
openapi_client/model/point_ops_any_of.py
|
|
||||||
openapi_client/model/point_ops_any_of1.py
|
|
||||||
openapi_client/model/point_ops_any_of1_delete_points.py
|
|
||||||
openapi_client/model/point_request.py
|
|
||||||
openapi_client/model/record.py
|
|
||||||
openapi_client/model/scored_point.py
|
|
||||||
openapi_client/model/search_params.py
|
|
||||||
openapi_client/model/search_params_any_of.py
|
|
||||||
openapi_client/model/search_params_any_of_hnsw.py
|
|
||||||
openapi_client/model/search_request.py
|
|
||||||
openapi_client/model/segment_config.py
|
|
||||||
openapi_client/model/storage_ops.py
|
|
||||||
openapi_client/model/storage_ops_any_of.py
|
|
||||||
openapi_client/model/storage_ops_any_of1.py
|
|
||||||
openapi_client/model/storage_ops_any_of2.py
|
|
||||||
openapi_client/model/storage_ops_any_of2_change_aliases.py
|
|
||||||
openapi_client/model/storage_ops_any_of_create_collection.py
|
|
||||||
openapi_client/model/storage_type.py
|
|
||||||
openapi_client/model/storage_type_any_of.py
|
|
||||||
openapi_client/model/storage_type_any_of1.py
|
|
||||||
openapi_client/model/update_result.py
|
|
||||||
openapi_client/model/update_status.py
|
|
||||||
openapi_client/model_utils.py
|
|
||||||
openapi_client/models/__init__.py
|
|
||||||
openapi_client/models/__init__.py
|
|
||||||
openapi_client/rest.py
|
|
||||||
requirements.txt
|
|
||||||
setup.cfg
|
|
||||||
setup.py
|
|
||||||
test-requirements.txt
|
|
||||||
test/__init__.py
|
|
||||||
test/test_collection_description.py
|
|
||||||
test/test_collection_info.py
|
|
||||||
test/test_collection_update_operations.py
|
|
||||||
test/test_collections_api.py
|
|
||||||
test/test_collections_response.py
|
|
||||||
test/test_condition.py
|
|
||||||
test/test_condition_any_of.py
|
|
||||||
test/test_condition_any_of1.py
|
|
||||||
test/test_condition_any_of2.py
|
|
||||||
test/test_condition_any_of3.py
|
|
||||||
test/test_condition_any_of4.py
|
|
||||||
test/test_distance.py
|
|
||||||
test/test_error_response.py
|
|
||||||
test/test_error_response_status.py
|
|
||||||
test/test_filter.py
|
|
||||||
test/test_indexes.py
|
|
||||||
test/test_indexes_any_of.py
|
|
||||||
test/test_indexes_any_of1.py
|
|
||||||
test/test_indexes_any_of1_options.py
|
|
||||||
test/test_inline_response200.py
|
|
||||||
test/test_inline_response2001.py
|
|
||||||
test/test_inline_response2002.py
|
|
||||||
test/test_inline_response2003.py
|
|
||||||
test/test_inline_response2004.py
|
|
||||||
test/test_inline_response2005.py
|
|
||||||
test/test_inline_response2006.py
|
|
||||||
test/test_payload_ops.py
|
|
||||||
test/test_payload_ops_any_of.py
|
|
||||||
test/test_payload_ops_any_of1.py
|
|
||||||
test/test_payload_ops_any_of1_delete_payload.py
|
|
||||||
test/test_payload_ops_any_of2.py
|
|
||||||
test/test_payload_ops_any_of2_clear_payload.py
|
|
||||||
test/test_payload_ops_any_of_set_payload.py
|
|
||||||
test/test_payload_type.py
|
|
||||||
test/test_payload_type_any_of.py
|
|
||||||
test/test_payload_type_any_of1.py
|
|
||||||
test/test_payload_type_any_of2.py
|
|
||||||
test/test_payload_type_any_of3.py
|
|
||||||
test/test_point_ops.py
|
|
||||||
test/test_point_ops_any_of.py
|
|
||||||
test/test_point_ops_any_of1.py
|
|
||||||
test/test_point_ops_any_of1_delete_points.py
|
|
||||||
test/test_point_request.py
|
|
||||||
test/test_points_api.py
|
|
||||||
test/test_record.py
|
|
||||||
test/test_scored_point.py
|
|
||||||
test/test_search_params.py
|
|
||||||
test/test_search_params_any_of.py
|
|
||||||
test/test_search_params_any_of_hnsw.py
|
|
||||||
test/test_search_request.py
|
|
||||||
test/test_segment_config.py
|
|
||||||
test/test_storage_ops.py
|
|
||||||
test/test_storage_ops_any_of.py
|
|
||||||
test/test_storage_ops_any_of1.py
|
|
||||||
test/test_storage_ops_any_of2.py
|
|
||||||
test/test_storage_ops_any_of2_change_aliases.py
|
|
||||||
test/test_storage_ops_any_of_create_collection.py
|
|
||||||
test/test_storage_type.py
|
|
||||||
test/test_storage_type_any_of.py
|
|
||||||
test/test_storage_type_any_of1.py
|
|
||||||
test/test_update_result.py
|
|
||||||
test/test_update_status.py
|
|
||||||
tox.ini
|
|
|
@ -1 +0,0 @@
|
||||||
5.0.0-SNAPSHOT
|
|
|
@ -1,13 +0,0 @@
|
||||||
# ref: https://docs.travis-ci.com/user/languages/python
|
|
||||||
language: python
|
|
||||||
python:
|
|
||||||
- "3.5"
|
|
||||||
- "3.6"
|
|
||||||
- "3.7"
|
|
||||||
- "3.8"
|
|
||||||
# command to install dependencies
|
|
||||||
install:
|
|
||||||
- "pip install -r requirements.txt"
|
|
||||||
- "pip install -r test-requirements.txt"
|
|
||||||
# command to run tests
|
|
||||||
script: pytest --cov=openapi_client
|
|
|
@ -1,186 +0,0 @@
|
||||||
# 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](https://openapi-generator.tech) 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:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
|
||||||
```
|
|
||||||
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
|
||||||
|
|
||||||
Then import the package:
|
|
||||||
```python
|
|
||||||
import openapi_client
|
|
||||||
```
|
|
||||||
|
|
||||||
### Setuptools
|
|
||||||
|
|
||||||
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
||||||
|
|
||||||
```sh
|
|
||||||
python setup.py install --user
|
|
||||||
```
|
|
||||||
(or `sudo python setup.py install` to install the package for all users)
|
|
||||||
|
|
||||||
Then import the package:
|
|
||||||
```python
|
|
||||||
import openapi_client
|
|
||||||
```
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
||||||
|
|
||||||
```python
|
|
||||||
|
|
||||||
import time
|
|
||||||
import openapi_client
|
|
||||||
from pprint import pprint
|
|
||||||
from openapi_client.api import collections_api
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.inline_response200 import InlineResponse200
|
|
||||||
from openapi_client.model.inline_response2001 import InlineResponse2001
|
|
||||||
from openapi_client.model.inline_response2002 import InlineResponse2002
|
|
||||||
from 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 = openapi_client.Configuration(
|
|
||||||
host = "http://localhost:6333"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with 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 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**](docs/CollectionsApi.md#get_collection) | **GET** /collections/{name} | Get information about existing collection
|
|
||||||
*CollectionsApi* | [**get_collections**](docs/CollectionsApi.md#get_collections) | **GET** /collections | Get list of existing collections
|
|
||||||
*CollectionsApi* | [**update_collections**](docs/CollectionsApi.md#update_collections) | **POST** /collections | Perform update operation on collections
|
|
||||||
*PointsApi* | [**get_point**](docs/PointsApi.md#get_point) | **GET** /collections/{name}/points/{id} | Retrieve point by id
|
|
||||||
*PointsApi* | [**get_points**](docs/PointsApi.md#get_points) | **POST** /collections/{name}/points | Retrieve points by ids
|
|
||||||
*PointsApi* | [**search_points**](docs/PointsApi.md#search_points) | **POST** /collections/{name}/points/search | Search points
|
|
||||||
*PointsApi* | [**update_points**](docs/PointsApi.md#update_points) | **POST** /collections/{name} | Update points in collection
|
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Models
|
|
||||||
|
|
||||||
- [CollectionDescription](docs/CollectionDescription.md)
|
|
||||||
- [CollectionInfo](docs/CollectionInfo.md)
|
|
||||||
- [CollectionUpdateOperations](docs/CollectionUpdateOperations.md)
|
|
||||||
- [CollectionsResponse](docs/CollectionsResponse.md)
|
|
||||||
- [Condition](docs/Condition.md)
|
|
||||||
- [ConditionAnyOf](docs/ConditionAnyOf.md)
|
|
||||||
- [ConditionAnyOf1](docs/ConditionAnyOf1.md)
|
|
||||||
- [ConditionAnyOf2](docs/ConditionAnyOf2.md)
|
|
||||||
- [ConditionAnyOf3](docs/ConditionAnyOf3.md)
|
|
||||||
- [ConditionAnyOf4](docs/ConditionAnyOf4.md)
|
|
||||||
- [Distance](docs/Distance.md)
|
|
||||||
- [ErrorResponse](docs/ErrorResponse.md)
|
|
||||||
- [ErrorResponseStatus](docs/ErrorResponseStatus.md)
|
|
||||||
- [Filter](docs/Filter.md)
|
|
||||||
- [Indexes](docs/Indexes.md)
|
|
||||||
- [IndexesAnyOf](docs/IndexesAnyOf.md)
|
|
||||||
- [IndexesAnyOf1](docs/IndexesAnyOf1.md)
|
|
||||||
- [IndexesAnyOf1Options](docs/IndexesAnyOf1Options.md)
|
|
||||||
- [InlineResponse200](docs/InlineResponse200.md)
|
|
||||||
- [InlineResponse2001](docs/InlineResponse2001.md)
|
|
||||||
- [InlineResponse2002](docs/InlineResponse2002.md)
|
|
||||||
- [InlineResponse2003](docs/InlineResponse2003.md)
|
|
||||||
- [InlineResponse2004](docs/InlineResponse2004.md)
|
|
||||||
- [InlineResponse2005](docs/InlineResponse2005.md)
|
|
||||||
- [InlineResponse2006](docs/InlineResponse2006.md)
|
|
||||||
- [PayloadOps](docs/PayloadOps.md)
|
|
||||||
- [PayloadOpsAnyOf](docs/PayloadOpsAnyOf.md)
|
|
||||||
- [PayloadOpsAnyOf1](docs/PayloadOpsAnyOf1.md)
|
|
||||||
- [PayloadOpsAnyOf1DeletePayload](docs/PayloadOpsAnyOf1DeletePayload.md)
|
|
||||||
- [PayloadOpsAnyOf2](docs/PayloadOpsAnyOf2.md)
|
|
||||||
- [PayloadOpsAnyOf2ClearPayload](docs/PayloadOpsAnyOf2ClearPayload.md)
|
|
||||||
- [PayloadOpsAnyOfSetPayload](docs/PayloadOpsAnyOfSetPayload.md)
|
|
||||||
- [PayloadType](docs/PayloadType.md)
|
|
||||||
- [PayloadTypeAnyOf](docs/PayloadTypeAnyOf.md)
|
|
||||||
- [PayloadTypeAnyOf1](docs/PayloadTypeAnyOf1.md)
|
|
||||||
- [PayloadTypeAnyOf2](docs/PayloadTypeAnyOf2.md)
|
|
||||||
- [PayloadTypeAnyOf3](docs/PayloadTypeAnyOf3.md)
|
|
||||||
- [PointOps](docs/PointOps.md)
|
|
||||||
- [PointOpsAnyOf](docs/PointOpsAnyOf.md)
|
|
||||||
- [PointOpsAnyOf1](docs/PointOpsAnyOf1.md)
|
|
||||||
- [PointOpsAnyOf1DeletePoints](docs/PointOpsAnyOf1DeletePoints.md)
|
|
||||||
- [PointRequest](docs/PointRequest.md)
|
|
||||||
- [Record](docs/Record.md)
|
|
||||||
- [ScoredPoint](docs/ScoredPoint.md)
|
|
||||||
- [SearchParams](docs/SearchParams.md)
|
|
||||||
- [SearchParamsAnyOf](docs/SearchParamsAnyOf.md)
|
|
||||||
- [SearchParamsAnyOfHnsw](docs/SearchParamsAnyOfHnsw.md)
|
|
||||||
- [SearchRequest](docs/SearchRequest.md)
|
|
||||||
- [SegmentConfig](docs/SegmentConfig.md)
|
|
||||||
- [StorageOps](docs/StorageOps.md)
|
|
||||||
- [StorageOpsAnyOf](docs/StorageOpsAnyOf.md)
|
|
||||||
- [StorageOpsAnyOf1](docs/StorageOpsAnyOf1.md)
|
|
||||||
- [StorageOpsAnyOf2](docs/StorageOpsAnyOf2.md)
|
|
||||||
- [StorageOpsAnyOf2ChangeAliases](docs/StorageOpsAnyOf2ChangeAliases.md)
|
|
||||||
- [StorageOpsAnyOfCreateCollection](docs/StorageOpsAnyOfCreateCollection.md)
|
|
||||||
- [StorageType](docs/StorageType.md)
|
|
||||||
- [StorageTypeAnyOf](docs/StorageTypeAnyOf.md)
|
|
||||||
- [StorageTypeAnyOf1](docs/StorageTypeAnyOf1.md)
|
|
||||||
- [UpdateResult](docs/UpdateResult.md)
|
|
||||||
- [UpdateStatus](docs/UpdateStatus.md)
|
|
||||||
|
|
||||||
|
|
||||||
## 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 openapi_client.apis and 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 openapi_client.api.default_api import DefaultApi`
|
|
||||||
- `from 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 openapi_client
|
|
||||||
from openapi_client.apis import *
|
|
||||||
from openapi_client.models import *
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# CollectionDescription
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**name** | **str** | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# CollectionInfo
|
|
||||||
|
|
||||||
Current statistics and configuration of the collection.
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**config** | **object** | Collection settings |
|
|
||||||
**disk_data_size** | **int** | Disk space, used by collection |
|
|
||||||
**ram_data_size** | **int** | RAM used by collection |
|
|
||||||
**segments_count** | **int** | Number of segments in collection |
|
|
||||||
**vectors_count** | **int** | Number of vectors in collection |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# CollectionUpdateOperations
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**upsert_points** | [**PointInsertOps**](PointInsertOps.md) | | defaults to nulltype.Null
|
|
||||||
**delete_points** | [**PointOpsAnyOf1DeletePoints**](PointOpsAnyOf1DeletePoints.md) | | defaults to nulltype.Null
|
|
||||||
**set_payload** | [**PayloadOpsAnyOfSetPayload**](PayloadOpsAnyOfSetPayload.md) | | defaults to nulltype.Null
|
|
||||||
**delete_payload** | [**PayloadOpsAnyOf1DeletePayload**](PayloadOpsAnyOf1DeletePayload.md) | | defaults to nulltype.Null
|
|
||||||
**clear_payload** | [**PayloadOpsAnyOf2ClearPayload**](PayloadOpsAnyOf2ClearPayload.md) | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,198 +0,0 @@
|
||||||
# openapi_client.CollectionsApi
|
|
||||||
|
|
||||||
All URIs are relative to *http://localhost:6333*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**get_collection**](CollectionsApi.md#get_collection) | **GET** /collections/{name} | Get information about existing collection
|
|
||||||
[**get_collections**](CollectionsApi.md#get_collections) | **GET** /collections | Get list of existing collections
|
|
||||||
[**update_collections**](CollectionsApi.md#update_collections) | **POST** /collections | Perform update operation on collections
|
|
||||||
|
|
||||||
|
|
||||||
# **get_collection**
|
|
||||||
> InlineResponse2002 get_collection(name)
|
|
||||||
|
|
||||||
Get information about existing collection
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
import time
|
|
||||||
import openapi_client
|
|
||||||
from openapi_client.api import collections_api
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.inline_response2002 import InlineResponse2002
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://localhost:6333
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = openapi_client.Configuration(
|
|
||||||
host = "http://localhost:6333"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with openapi_client.ApiClient() 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
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
try:
|
|
||||||
# Get information about existing collection
|
|
||||||
api_response = api_instance.get_collection(name)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling CollectionsApi->get_collection: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**name** | **str**| Name of the collection to retrieve |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**InlineResponse2002**](InlineResponse2002.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | successful operation | - |
|
|
||||||
**0** | error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_collections**
|
|
||||||
> InlineResponse200 get_collections()
|
|
||||||
|
|
||||||
Get list of existing collections
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
import time
|
|
||||||
import openapi_client
|
|
||||||
from openapi_client.api import collections_api
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.inline_response200 import InlineResponse200
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://localhost:6333
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = openapi_client.Configuration(
|
|
||||||
host = "http://localhost:6333"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with openapi_client.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = collections_api.CollectionsApi(api_client)
|
|
||||||
|
|
||||||
# example, this endpoint has no required or optional parameters
|
|
||||||
try:
|
|
||||||
# Get list of existing collections
|
|
||||||
api_response = api_instance.get_collections()
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling CollectionsApi->get_collections: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
This endpoint does not need any parameter.
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**InlineResponse200**](InlineResponse200.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | successful operation | - |
|
|
||||||
**0** | error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **update_collections**
|
|
||||||
> InlineResponse2001 update_collections()
|
|
||||||
|
|
||||||
Perform update operation on collections
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
import time
|
|
||||||
import openapi_client
|
|
||||||
from openapi_client.api import collections_api
|
|
||||||
from openapi_client.model.inline_response2001 import InlineResponse2001
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.storage_ops import StorageOps
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://localhost:6333
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = openapi_client.Configuration(
|
|
||||||
host = "http://localhost:6333"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with openapi_client.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = collections_api.CollectionsApi(api_client)
|
|
||||||
storage_ops = StorageOps() # StorageOps | Operation to perform on collections (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
# Perform update operation on collections
|
|
||||||
api_response = api_instance.update_collections(storage_ops=storage_ops)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling CollectionsApi->update_collections: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**storage_ops** | [**StorageOps**](StorageOps.md)| Operation to perform on collections | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**InlineResponse2001**](InlineResponse2001.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | successful operation | - |
|
|
||||||
**0** | error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# CollectionsResponse
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**collections** | [**[CollectionDescription]**](CollectionDescription.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# Condition
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**filter** | [**Filter**](Filter.md) | | defaults to nulltype.Null
|
|
||||||
**match** | [**Match**](Match.md) | | defaults to nulltype.Null
|
|
||||||
**range** | [**Range**](Range.md) | | defaults to nulltype.Null
|
|
||||||
**geo_bounding_box** | [**GeoBoundingBox**](GeoBoundingBox.md) | | defaults to nulltype.Null
|
|
||||||
**has_id** | **[int]** | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# ConditionAnyOf
|
|
||||||
|
|
||||||
Nested filter
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**filter** | [**Filter**](Filter.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# ConditionAnyOf1
|
|
||||||
|
|
||||||
Check if point has field with a given value
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**match** | [**Match**](Match.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# ConditionAnyOf2
|
|
||||||
|
|
||||||
Check if points value lies in a given range
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**range** | [**Range**](Range.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# ConditionAnyOf3
|
|
||||||
|
|
||||||
Check if points geo location lies in a given area
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**geo_bounding_box** | [**GeoBoundingBox**](GeoBoundingBox.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# ConditionAnyOf4
|
|
||||||
|
|
||||||
Check if points id is in a given set
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**has_id** | **[int]** | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# Distance
|
|
||||||
|
|
||||||
Type of internal tags, build from payload Distance function types used to compare vectors
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**value** | **str** | Type of internal tags, build from payload Distance function types used to compare vectors | must be one of ["Cosine", "Euclid", "Dot", ]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# ErrorResponse
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**time** | **float** | Time spent to process this request | [optional]
|
|
||||||
**status** | [**ErrorResponseStatus**](ErrorResponseStatus.md) | | [optional]
|
|
||||||
**result** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# ErrorResponseStatus
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**error** | **str** | Description of the occurred error. | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# Filter
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**must** | [**[Condition], none_type**](Condition.md) | All conditions must match | [optional]
|
|
||||||
**must_not** | [**[Condition], none_type**](Condition.md) | All conditions must NOT match | [optional]
|
|
||||||
**should** | [**[Condition], none_type**](Condition.md) | At least one of thous conditions should match | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# Indexes
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**options** | [**IndexesAnyOf1Options**](IndexesAnyOf1Options.md) | | defaults to nulltype.Null
|
|
||||||
**type** | **str** | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# IndexesAnyOf
|
|
||||||
|
|
||||||
Do not use any index, scan whole vector collection during search. Guarantee 100% precision, but may be time consuming on large collections.
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**options** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | |
|
|
||||||
**type** | **str** | | defaults to "plain"
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# IndexesAnyOf1
|
|
||||||
|
|
||||||
Use filterable HNSW index for approximate search. Is very fast even on a very huge collections, but require additional space to store index and additional time to build it.
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**options** | [**IndexesAnyOf1Options**](IndexesAnyOf1Options.md) | |
|
|
||||||
**type** | **str** | | defaults to "hnsw"
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# IndexesAnyOf1Options
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**ef_construct** | **int** | Number of neighbours to consider during the index building. Larger the value - more accurate the search, more time required to build index. |
|
|
||||||
**m** | **int** | Number of edges per node in the index graph. Larger the value - more accurate the search, more space required. |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# InlineResponse200
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**time** | **float** | Time spent to process this request | [optional]
|
|
||||||
**status** | **str** | | [optional] if omitted the server will use the default value of "Ok"
|
|
||||||
**result** | [**CollectionsResponse**](CollectionsResponse.md) | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# InlineResponse2001
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**time** | **float** | Time spent to process this request | [optional]
|
|
||||||
**status** | **str** | | [optional] if omitted the server will use the default value of "Ok"
|
|
||||||
**result** | **bool** | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# InlineResponse2002
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**time** | **float** | Time spent to process this request | [optional]
|
|
||||||
**status** | **str** | | [optional] if omitted the server will use the default value of "Ok"
|
|
||||||
**result** | [**CollectionInfo**](CollectionInfo.md) | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# InlineResponse2003
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**time** | **float** | Time spent to process this request | [optional]
|
|
||||||
**status** | **str** | | [optional] if omitted the server will use the default value of "Ok"
|
|
||||||
**result** | [**[UpdateResult]**](UpdateResult.md) | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# InlineResponse2004
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**time** | **float** | Time spent to process this request | [optional]
|
|
||||||
**status** | **str** | | [optional] if omitted the server will use the default value of "Ok"
|
|
||||||
**result** | [**Record**](Record.md) | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# InlineResponse2005
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**time** | **float** | Time spent to process this request | [optional]
|
|
||||||
**status** | **str** | | [optional] if omitted the server will use the default value of "Ok"
|
|
||||||
**result** | [**[Record]**](Record.md) | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# InlineResponse2006
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**time** | **float** | Time spent to process this request | [optional]
|
|
||||||
**status** | **str** | | [optional] if omitted the server will use the default value of "Ok"
|
|
||||||
**result** | [**[ScoredPoint]**](ScoredPoint.md) | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
# PayloadOps
|
|
||||||
|
|
||||||
Define operations description for point payloads manipulation
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**set_payload** | [**PayloadOpsAnyOfSetPayload**](PayloadOpsAnyOfSetPayload.md) | | defaults to nulltype.Null
|
|
||||||
**delete_payload** | [**PayloadOpsAnyOf1DeletePayload**](PayloadOpsAnyOf1DeletePayload.md) | | defaults to nulltype.Null
|
|
||||||
**clear_payload** | [**PayloadOpsAnyOf2ClearPayload**](PayloadOpsAnyOf2ClearPayload.md) | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadOpsAnyOf
|
|
||||||
|
|
||||||
Set payload value, overrides if it is already exists
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**set_payload** | [**PayloadOpsAnyOfSetPayload**](PayloadOpsAnyOfSetPayload.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadOpsAnyOf1
|
|
||||||
|
|
||||||
Deletes specified payload values if they are assigned
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**delete_payload** | [**PayloadOpsAnyOf1DeletePayload**](PayloadOpsAnyOf1DeletePayload.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadOpsAnyOf1DeletePayload
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**keys** | **[str]** | |
|
|
||||||
**points** | **[int]** | Deletes values from each point in this list |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadOpsAnyOf2
|
|
||||||
|
|
||||||
Drops all Payload values associated with given points.
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**clear_payload** | [**PayloadOpsAnyOf2ClearPayload**](PayloadOpsAnyOf2ClearPayload.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# PayloadOpsAnyOf2ClearPayload
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**points** | **[int]** | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadOpsAnyOfSetPayload
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**payload** | [**{str: (PayloadInterface,)}**](PayloadInterface.md) | |
|
|
||||||
**points** | **[int]** | Assigns payload to each point in this list |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# PayloadType
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**type** | **str** | | defaults to nulltype.Null
|
|
||||||
**value** | [**[GeoPoint]**](GeoPoint.md) | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadTypeAnyOf
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**value** | **[str]** | |
|
|
||||||
**type** | **str** | | defaults to "keyword"
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadTypeAnyOf1
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**value** | **[int]** | |
|
|
||||||
**type** | **str** | | defaults to "integer"
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadTypeAnyOf2
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**value** | **[float]** | |
|
|
||||||
**type** | **str** | | defaults to "float"
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PayloadTypeAnyOf3
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**value** | [**[GeoPoint]**](GeoPoint.md) | |
|
|
||||||
**type** | **str** | | defaults to "geo"
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# PointOps
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**upsert_points** | [**PointInsertOps**](PointInsertOps.md) | | defaults to nulltype.Null
|
|
||||||
**delete_points** | [**PointOpsAnyOf1DeletePoints**](PointOpsAnyOf1DeletePoints.md) | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PointOpsAnyOf
|
|
||||||
|
|
||||||
Insert or update points
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**upsert_points** | [**PointInsertOps**](PointInsertOps.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# PointOpsAnyOf1
|
|
||||||
|
|
||||||
Delete point if exists
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**delete_points** | [**PointOpsAnyOf1DeletePoints**](PointOpsAnyOf1DeletePoints.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# PointOpsAnyOf1DeletePoints
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**ids** | **[int]** | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# PointRequest
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**ids** | **[int]** | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,313 +0,0 @@
|
||||||
# openapi_client.PointsApi
|
|
||||||
|
|
||||||
All URIs are relative to *http://localhost:6333*
|
|
||||||
|
|
||||||
Method | HTTP request | Description
|
|
||||||
------------- | ------------- | -------------
|
|
||||||
[**get_point**](PointsApi.md#get_point) | **GET** /collections/{name}/points/{id} | Retrieve point by id
|
|
||||||
[**get_points**](PointsApi.md#get_points) | **POST** /collections/{name}/points | Retrieve points by ids
|
|
||||||
[**search_points**](PointsApi.md#search_points) | **POST** /collections/{name}/points/search | Search points
|
|
||||||
[**update_points**](PointsApi.md#update_points) | **POST** /collections/{name} | Update points in collection
|
|
||||||
|
|
||||||
|
|
||||||
# **get_point**
|
|
||||||
> InlineResponse2004 get_point(name, id)
|
|
||||||
|
|
||||||
Retrieve point by id
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
import time
|
|
||||||
import openapi_client
|
|
||||||
from openapi_client.api import points_api
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.inline_response2004 import InlineResponse2004
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://localhost:6333
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = openapi_client.Configuration(
|
|
||||||
host = "http://localhost:6333"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with openapi_client.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = points_api.PointsApi(api_client)
|
|
||||||
name = "name_example" # str | Name of the collection to retrieve from
|
|
||||||
id = 1 # int | Id of the point
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
try:
|
|
||||||
# Retrieve point by id
|
|
||||||
api_response = api_instance.get_point(name, id)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling PointsApi->get_point: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**name** | **str**| Name of the collection to retrieve from |
|
|
||||||
**id** | **int**| Id of the point |
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**InlineResponse2004**](InlineResponse2004.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | successful operation | - |
|
|
||||||
**0** | error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **get_points**
|
|
||||||
> InlineResponse2005 get_points(name)
|
|
||||||
|
|
||||||
Retrieve points by ids
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
import time
|
|
||||||
import openapi_client
|
|
||||||
from openapi_client.api import points_api
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.inline_response2005 import InlineResponse2005
|
|
||||||
from openapi_client.model.point_request import PointRequest
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://localhost:6333
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = openapi_client.Configuration(
|
|
||||||
host = "http://localhost:6333"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with openapi_client.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = points_api.PointsApi(api_client)
|
|
||||||
name = "name_example" # str | Name of the collection to retrieve from
|
|
||||||
point_request = PointRequest(
|
|
||||||
ids=[
|
|
||||||
0,
|
|
||||||
],
|
|
||||||
) # PointRequest | List of points to retrieve (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
try:
|
|
||||||
# Retrieve points by ids
|
|
||||||
api_response = api_instance.get_points(name)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling PointsApi->get_points: %s\n" % e)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
# Retrieve points by ids
|
|
||||||
api_response = api_instance.get_points(name, point_request=point_request)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling PointsApi->get_points: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**name** | **str**| Name of the collection to retrieve from |
|
|
||||||
**point_request** | [**PointRequest**](PointRequest.md)| List of points to retrieve | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**InlineResponse2005**](InlineResponse2005.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | successful operation | - |
|
|
||||||
**0** | error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **search_points**
|
|
||||||
> InlineResponse2006 search_points(name)
|
|
||||||
|
|
||||||
Search points
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
import time
|
|
||||||
import openapi_client
|
|
||||||
from openapi_client.api import points_api
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.inline_response2006 import InlineResponse2006
|
|
||||||
from openapi_client.model.search_request import SearchRequest
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://localhost:6333
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = openapi_client.Configuration(
|
|
||||||
host = "http://localhost:6333"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with openapi_client.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = points_api.PointsApi(api_client)
|
|
||||||
name = "name_example" # str | Name of the collection to search in
|
|
||||||
search_request = SearchRequest(
|
|
||||||
filter=,
|
|
||||||
params=,
|
|
||||||
top=0,
|
|
||||||
vector=[
|
|
||||||
3.14,
|
|
||||||
],
|
|
||||||
) # SearchRequest | Search request with optional filtering (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
try:
|
|
||||||
# Search points
|
|
||||||
api_response = api_instance.search_points(name)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling PointsApi->search_points: %s\n" % e)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
# Search points
|
|
||||||
api_response = api_instance.search_points(name, search_request=search_request)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling PointsApi->search_points: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**name** | **str**| Name of the collection to search in |
|
|
||||||
**search_request** | [**SearchRequest**](SearchRequest.md)| Search request with optional filtering | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**InlineResponse2006**](InlineResponse2006.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | successful operation | - |
|
|
||||||
**0** | error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
# **update_points**
|
|
||||||
> InlineResponse2003 update_points(name)
|
|
||||||
|
|
||||||
Update points in collection
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```python
|
|
||||||
import time
|
|
||||||
import openapi_client
|
|
||||||
from openapi_client.api import points_api
|
|
||||||
from openapi_client.model.inline_response2003 import InlineResponse2003
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.collection_update_operations import CollectionUpdateOperations
|
|
||||||
from pprint import pprint
|
|
||||||
# Defining the host is optional and defaults to http://localhost:6333
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = openapi_client.Configuration(
|
|
||||||
host = "http://localhost:6333"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with openapi_client.ApiClient() as api_client:
|
|
||||||
# Create an instance of the API class
|
|
||||||
api_instance = points_api.PointsApi(api_client)
|
|
||||||
name = "name_example" # str | Name of the collection to search in
|
|
||||||
collection_update_operations = CollectionUpdateOperations() # CollectionUpdateOperations | Points update operations (optional)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
try:
|
|
||||||
# Update points in collection
|
|
||||||
api_response = api_instance.update_points(name)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling PointsApi->update_points: %s\n" % e)
|
|
||||||
|
|
||||||
# example passing only required values which don't have defaults set
|
|
||||||
# and optional values
|
|
||||||
try:
|
|
||||||
# Update points in collection
|
|
||||||
api_response = api_instance.update_points(name, collection_update_operations=collection_update_operations)
|
|
||||||
pprint(api_response)
|
|
||||||
except openapi_client.ApiException as e:
|
|
||||||
print("Exception when calling PointsApi->update_points: %s\n" % e)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------- | ------------- | ------------- | -------------
|
|
||||||
**name** | **str**| Name of the collection to search in |
|
|
||||||
**collection_update_operations** | [**CollectionUpdateOperations**](CollectionUpdateOperations.md)| Points update operations | [optional]
|
|
||||||
|
|
||||||
### Return type
|
|
||||||
|
|
||||||
[**InlineResponse2003**](InlineResponse2003.md)
|
|
||||||
|
|
||||||
### Authorization
|
|
||||||
|
|
||||||
No authorization required
|
|
||||||
|
|
||||||
### HTTP request headers
|
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
|
||||||
- **Accept**: application/json
|
|
||||||
|
|
||||||
### HTTP response details
|
|
||||||
| Status code | Description | Response headers |
|
|
||||||
|-------------|-------------|------------------|
|
|
||||||
**200** | successful operation | - |
|
|
||||||
**0** | error | - |
|
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# Record
|
|
||||||
|
|
||||||
Point data
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **int** | Id of the point |
|
|
||||||
**payload** | [**{str: (PayloadType,)}, none_type**](PayloadType.md) | Payload - values assigned to the point | [optional]
|
|
||||||
**vector** | **[float], none_type** | Vector of the point | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# ScoredPoint
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**id** | **int** | Point id |
|
|
||||||
**score** | **float** | Points vector distance to the query vector |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# SearchParams
|
|
||||||
|
|
||||||
Additional parameters of the search
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**hnsw** | [**SearchParamsAnyOfHnsw**](SearchParamsAnyOfHnsw.md) | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# SearchParamsAnyOf
|
|
||||||
|
|
||||||
Params relevant to HNSW index
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**hnsw** | [**SearchParamsAnyOfHnsw**](SearchParamsAnyOfHnsw.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# SearchParamsAnyOfHnsw
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**ef** | **int** | Size of the beam in a beam-search. Larger the value - more accurate the result, more time required for search. |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
# SearchRequest
|
|
||||||
|
|
||||||
Search request
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**top** | **int** | Max number of result to return |
|
|
||||||
**vector** | **[float]** | Look for vectors closest to this |
|
|
||||||
**filter** | **object** | Look only for points which satisfies this conditions | [optional]
|
|
||||||
**params** | **object** | Additional search params | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# SegmentConfig
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**distance** | **object** | Type of distance function used for measuring distance between vectors |
|
|
||||||
**index** | **object** | Type of index used for search |
|
|
||||||
**storage_type** | **object** | Type of vector storage |
|
|
||||||
**vector_size** | **int** | Size of a vectors used |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# StorageOps
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**create_collection** | [**StorageOpsAnyOfCreateCollection**](StorageOpsAnyOfCreateCollection.md) | | defaults to nulltype.Null
|
|
||||||
**delete_collection** | **str** | | defaults to nulltype.Null
|
|
||||||
**change_aliases** | [**StorageOpsAnyOf2ChangeAliases**](StorageOpsAnyOf2ChangeAliases.md) | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# StorageOpsAnyOf
|
|
||||||
|
|
||||||
Create new collection and (optionally) specify index params
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**create_collection** | [**StorageOpsAnyOfCreateCollection**](StorageOpsAnyOfCreateCollection.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# StorageOpsAnyOf1
|
|
||||||
|
|
||||||
Delete collection with given name
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**delete_collection** | **str** | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# StorageOpsAnyOf2
|
|
||||||
|
|
||||||
Perform changes of collection aliases Alias changes are atomic, meaning that no collection modifications can happen between alias operations
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**change_aliases** | [**StorageOpsAnyOf2ChangeAliases**](StorageOpsAnyOf2ChangeAliases.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# StorageOpsAnyOf2ChangeAliases
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**actions** | [**[AliasOperations]**](AliasOperations.md) | |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
# StorageOpsAnyOfCreateCollection
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**distance** | [**Distance**](Distance.md) | |
|
|
||||||
**name** | **str** | |
|
|
||||||
**vector_size** | **int** | |
|
|
||||||
**index** | **object** | | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
# StorageType
|
|
||||||
|
|
||||||
Type of vector storage
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**type** | **str** | | defaults to nulltype.Null
|
|
||||||
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# StorageTypeAnyOf
|
|
||||||
|
|
||||||
Store vectors in memory and use persistence storage only if vectors are changed
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**type** | **str** | | defaults to "in_memory"
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# StorageTypeAnyOf1
|
|
||||||
|
|
||||||
Use memmap to store vectors, a little slower than `InMemory`, but requires little RAM
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**type** | **str** | | defaults to "mmap"
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
# UpdateResult
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**operation_id** | **int** | Sequential number of the operation |
|
|
||||||
**status** | **object** | Update status |
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
# UpdateStatus
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
Name | Type | Description | Notes
|
|
||||||
------------ | ------------- | ------------- | -------------
|
|
||||||
**value** | **str** | | must be one of ["acknowledged", "completed", ]
|
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
||||||
|
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
||||||
#
|
|
||||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
|
||||||
|
|
||||||
git_user_id=$1
|
|
||||||
git_repo_id=$2
|
|
||||||
release_note=$3
|
|
||||||
git_host=$4
|
|
||||||
|
|
||||||
if [ "$git_host" = "" ]; then
|
|
||||||
git_host="github.com"
|
|
||||||
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$git_user_id" = "" ]; then
|
|
||||||
git_user_id="GIT_USER_ID"
|
|
||||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$git_repo_id" = "" ]; then
|
|
||||||
git_repo_id="GIT_REPO_ID"
|
|
||||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$release_note" = "" ]; then
|
|
||||||
release_note="Minor update"
|
|
||||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Initialize the local directory as a Git repository
|
|
||||||
git init
|
|
||||||
|
|
||||||
# Adds the files in the local repository and stages them for commit.
|
|
||||||
git add .
|
|
||||||
|
|
||||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
||||||
git commit -m "$release_note"
|
|
||||||
|
|
||||||
# Sets the new remote
|
|
||||||
git_remote=`git remote`
|
|
||||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
||||||
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
|
||||||
else
|
|
||||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
git pull origin master
|
|
||||||
|
|
||||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
||||||
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
|
||||||
git push origin master 2>&1 | grep -v 'To https'
|
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
# flake8: noqa
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
__version__ = "1.0.0"
|
|
||||||
|
|
||||||
# import ApiClient
|
|
||||||
from openapi_client.api_client import ApiClient
|
|
||||||
|
|
||||||
# import Configuration
|
|
||||||
from openapi_client.configuration import Configuration
|
|
||||||
|
|
||||||
# import exceptions
|
|
||||||
from openapi_client.exceptions import OpenApiException
|
|
||||||
from openapi_client.exceptions import ApiAttributeError
|
|
||||||
from openapi_client.exceptions import ApiTypeError
|
|
||||||
from openapi_client.exceptions import ApiValueError
|
|
||||||
from openapi_client.exceptions import ApiKeyError
|
|
||||||
from openapi_client.exceptions import ApiException
|
|
|
@ -1,3 +0,0 @@
|
||||||
# do not import all apis into this module because that uses a lot of memory and stack frames
|
|
||||||
# if you need the ability to import all apis from one package, import them with
|
|
||||||
# from openapi_client.apis import CollectionsApi
|
|
|
@ -1,375 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.api_client import ApiClient, Endpoint
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
check_allowed_values,
|
|
||||||
check_validations,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_and_convert_types
|
|
||||||
)
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.inline_response200 import InlineResponse200
|
|
||||||
from openapi_client.model.inline_response2001 import InlineResponse2001
|
|
||||||
from openapi_client.model.inline_response2002 import InlineResponse2002
|
|
||||||
from openapi_client.model.storage_ops import StorageOps
|
|
||||||
|
|
||||||
|
|
||||||
class CollectionsApi(object):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, api_client=None):
|
|
||||||
if api_client is None:
|
|
||||||
api_client = ApiClient()
|
|
||||||
self.api_client = api_client
|
|
||||||
|
|
||||||
def __get_collection(
|
|
||||||
self,
|
|
||||||
name,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Get information about existing collection # noqa: E501
|
|
||||||
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.get_collection(name, async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
Args:
|
|
||||||
name (str): Name of the collection to retrieve
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
InlineResponse2002
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
kwargs['name'] = \
|
|
||||||
name
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.get_collection = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (InlineResponse2002,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/collections/{name}',
|
|
||||||
'operation_id': 'get_collection',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'name',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'name',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'name':
|
|
||||||
(str,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'name': 'name',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'name': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_collection
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_collections(
|
|
||||||
self,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Get list of existing collections # noqa: E501
|
|
||||||
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.get_collections(async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
InlineResponse200
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.get_collections = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (InlineResponse200,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/collections',
|
|
||||||
'operation_id': 'get_collections',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_collections
|
|
||||||
)
|
|
||||||
|
|
||||||
def __update_collections(
|
|
||||||
self,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Perform update operation on collections # noqa: E501
|
|
||||||
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.update_collections(async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
storage_ops (StorageOps): Operation to perform on collections. [optional]
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
InlineResponse2001
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.update_collections = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (InlineResponse2001,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/collections',
|
|
||||||
'operation_id': 'update_collections',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'storage_ops',
|
|
||||||
],
|
|
||||||
'required': [],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'storage_ops':
|
|
||||||
(StorageOps,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'storage_ops': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__update_collections
|
|
||||||
)
|
|
|
@ -1,542 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.api_client import ApiClient, Endpoint
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
check_allowed_values,
|
|
||||||
check_validations,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_and_convert_types
|
|
||||||
)
|
|
||||||
from openapi_client.model.collection_update_operations import CollectionUpdateOperations
|
|
||||||
from openapi_client.model.error_response import ErrorResponse
|
|
||||||
from openapi_client.model.inline_response2003 import InlineResponse2003
|
|
||||||
from openapi_client.model.inline_response2004 import InlineResponse2004
|
|
||||||
from openapi_client.model.inline_response2005 import InlineResponse2005
|
|
||||||
from openapi_client.model.inline_response2006 import InlineResponse2006
|
|
||||||
from openapi_client.model.point_request import PointRequest
|
|
||||||
from openapi_client.model.search_request import SearchRequest
|
|
||||||
|
|
||||||
|
|
||||||
class PointsApi(object):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self, api_client=None):
|
|
||||||
if api_client is None:
|
|
||||||
api_client = ApiClient()
|
|
||||||
self.api_client = api_client
|
|
||||||
|
|
||||||
def __get_point(
|
|
||||||
self,
|
|
||||||
name,
|
|
||||||
id,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Retrieve point by id # noqa: E501
|
|
||||||
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.get_point(name, id, async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
Args:
|
|
||||||
name (str): Name of the collection to retrieve from
|
|
||||||
id (int): Id of the point
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
InlineResponse2004
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
kwargs['name'] = \
|
|
||||||
name
|
|
||||||
kwargs['id'] = \
|
|
||||||
id
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.get_point = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (InlineResponse2004,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/collections/{name}/points/{id}',
|
|
||||||
'operation_id': 'get_point',
|
|
||||||
'http_method': 'GET',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'name',
|
|
||||||
'id',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'name',
|
|
||||||
'id',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'name':
|
|
||||||
(str,),
|
|
||||||
'id':
|
|
||||||
(int,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'name': 'name',
|
|
||||||
'id': 'id',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'name': 'path',
|
|
||||||
'id': 'path',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [],
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_point
|
|
||||||
)
|
|
||||||
|
|
||||||
def __get_points(
|
|
||||||
self,
|
|
||||||
name,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Retrieve points by ids # noqa: E501
|
|
||||||
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.get_points(name, async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
Args:
|
|
||||||
name (str): Name of the collection to retrieve from
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
point_request (PointRequest): List of points to retrieve. [optional]
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
InlineResponse2005
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
kwargs['name'] = \
|
|
||||||
name
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.get_points = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (InlineResponse2005,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/collections/{name}/points',
|
|
||||||
'operation_id': 'get_points',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'name',
|
|
||||||
'point_request',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'name',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'name':
|
|
||||||
(str,),
|
|
||||||
'point_request':
|
|
||||||
(PointRequest,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'name': 'name',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'name': 'path',
|
|
||||||
'point_request': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__get_points
|
|
||||||
)
|
|
||||||
|
|
||||||
def __search_points(
|
|
||||||
self,
|
|
||||||
name,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Search points # noqa: E501
|
|
||||||
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.search_points(name, async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
Args:
|
|
||||||
name (str): Name of the collection to search in
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
search_request (SearchRequest): Search request with optional filtering. [optional]
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
InlineResponse2006
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
kwargs['name'] = \
|
|
||||||
name
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.search_points = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (InlineResponse2006,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/collections/{name}/points/search',
|
|
||||||
'operation_id': 'search_points',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'name',
|
|
||||||
'search_request',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'name',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'name':
|
|
||||||
(str,),
|
|
||||||
'search_request':
|
|
||||||
(SearchRequest,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'name': 'name',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'name': 'path',
|
|
||||||
'search_request': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__search_points
|
|
||||||
)
|
|
||||||
|
|
||||||
def __update_points(
|
|
||||||
self,
|
|
||||||
name,
|
|
||||||
**kwargs
|
|
||||||
):
|
|
||||||
"""Update points in collection # noqa: E501
|
|
||||||
|
|
||||||
This method makes a synchronous HTTP request by default. To make an
|
|
||||||
asynchronous HTTP request, please pass async_req=True
|
|
||||||
|
|
||||||
>>> thread = api.update_points(name, async_req=True)
|
|
||||||
>>> result = thread.get()
|
|
||||||
|
|
||||||
Args:
|
|
||||||
name (str): Name of the collection to search in
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
collection_update_operations (CollectionUpdateOperations): Points update operations. [optional]
|
|
||||||
_return_http_data_only (bool): response data without head status
|
|
||||||
code and headers. Default is True.
|
|
||||||
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
||||||
will be returned without reading/decoding response data.
|
|
||||||
Default is True.
|
|
||||||
_request_timeout (float/tuple): timeout setting for this request. If one
|
|
||||||
number provided, it will be total request timeout. It can also
|
|
||||||
be a pair (tuple) of (connection, read) timeouts.
|
|
||||||
Default is None.
|
|
||||||
_check_input_type (bool): specifies if type checking
|
|
||||||
should be done one the data sent to the server.
|
|
||||||
Default is True.
|
|
||||||
_check_return_type (bool): specifies if type checking
|
|
||||||
should be done one the data received from the server.
|
|
||||||
Default is True.
|
|
||||||
_host_index (int/None): specifies the index of the server
|
|
||||||
that we want to use.
|
|
||||||
Default is read from the configuration.
|
|
||||||
async_req (bool): execute request asynchronously
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
InlineResponse2003
|
|
||||||
If the method is called asynchronously, returns the request
|
|
||||||
thread.
|
|
||||||
"""
|
|
||||||
kwargs['async_req'] = kwargs.get(
|
|
||||||
'async_req', False
|
|
||||||
)
|
|
||||||
kwargs['_return_http_data_only'] = kwargs.get(
|
|
||||||
'_return_http_data_only', True
|
|
||||||
)
|
|
||||||
kwargs['_preload_content'] = kwargs.get(
|
|
||||||
'_preload_content', True
|
|
||||||
)
|
|
||||||
kwargs['_request_timeout'] = kwargs.get(
|
|
||||||
'_request_timeout', None
|
|
||||||
)
|
|
||||||
kwargs['_check_input_type'] = kwargs.get(
|
|
||||||
'_check_input_type', True
|
|
||||||
)
|
|
||||||
kwargs['_check_return_type'] = kwargs.get(
|
|
||||||
'_check_return_type', True
|
|
||||||
)
|
|
||||||
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
||||||
kwargs['name'] = \
|
|
||||||
name
|
|
||||||
return self.call_with_http_info(**kwargs)
|
|
||||||
|
|
||||||
self.update_points = Endpoint(
|
|
||||||
settings={
|
|
||||||
'response_type': (InlineResponse2003,),
|
|
||||||
'auth': [],
|
|
||||||
'endpoint_path': '/collections/{name}',
|
|
||||||
'operation_id': 'update_points',
|
|
||||||
'http_method': 'POST',
|
|
||||||
'servers': None,
|
|
||||||
},
|
|
||||||
params_map={
|
|
||||||
'all': [
|
|
||||||
'name',
|
|
||||||
'collection_update_operations',
|
|
||||||
],
|
|
||||||
'required': [
|
|
||||||
'name',
|
|
||||||
],
|
|
||||||
'nullable': [
|
|
||||||
],
|
|
||||||
'enum': [
|
|
||||||
],
|
|
||||||
'validation': [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
root_map={
|
|
||||||
'validations': {
|
|
||||||
},
|
|
||||||
'allowed_values': {
|
|
||||||
},
|
|
||||||
'openapi_types': {
|
|
||||||
'name':
|
|
||||||
(str,),
|
|
||||||
'collection_update_operations':
|
|
||||||
(CollectionUpdateOperations,),
|
|
||||||
},
|
|
||||||
'attribute_map': {
|
|
||||||
'name': 'name',
|
|
||||||
},
|
|
||||||
'location_map': {
|
|
||||||
'name': 'path',
|
|
||||||
'collection_update_operations': 'body',
|
|
||||||
},
|
|
||||||
'collection_format_map': {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
headers_map={
|
|
||||||
'accept': [
|
|
||||||
'application/json'
|
|
||||||
],
|
|
||||||
'content_type': [
|
|
||||||
'application/json'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
api_client=api_client,
|
|
||||||
callable=__update_points
|
|
||||||
)
|
|
|
@ -1,819 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import json
|
|
||||||
import atexit
|
|
||||||
import mimetypes
|
|
||||||
from multiprocessing.pool import ThreadPool
|
|
||||||
import io
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import typing
|
|
||||||
from urllib.parse import quote
|
|
||||||
|
|
||||||
|
|
||||||
from openapi_client import rest
|
|
||||||
from openapi_client.configuration import Configuration
|
|
||||||
from openapi_client.exceptions import ApiTypeError, ApiValueError, ApiException
|
|
||||||
from openapi_client.model_utils import (
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
ModelComposed,
|
|
||||||
check_allowed_values,
|
|
||||||
check_validations,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
deserialize_file,
|
|
||||||
file_type,
|
|
||||||
model_to_dict,
|
|
||||||
none_type,
|
|
||||||
validate_and_convert_types
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ApiClient(object):
|
|
||||||
"""Generic API client for OpenAPI client library builds.
|
|
||||||
|
|
||||||
OpenAPI generic API client. This client handles the client-
|
|
||||||
server communication, and is invariant across implementations. Specifics of
|
|
||||||
the methods and models for each application are generated from the OpenAPI
|
|
||||||
templates.
|
|
||||||
|
|
||||||
NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
:param configuration: .Configuration object for this client
|
|
||||||
:param header_name: a header to pass when making calls to the API.
|
|
||||||
:param header_value: a header value to pass when making calls to
|
|
||||||
the API.
|
|
||||||
:param cookie: a cookie to include in the header when making calls
|
|
||||||
to the API
|
|
||||||
:param pool_threads: The number of threads to use for async requests
|
|
||||||
to the API. More threads means more concurrent API requests.
|
|
||||||
"""
|
|
||||||
|
|
||||||
_pool = None
|
|
||||||
|
|
||||||
def __init__(self, configuration=None, header_name=None, header_value=None,
|
|
||||||
cookie=None, pool_threads=1):
|
|
||||||
if configuration is None:
|
|
||||||
configuration = Configuration()
|
|
||||||
self.configuration = configuration
|
|
||||||
self.pool_threads = pool_threads
|
|
||||||
|
|
||||||
self.rest_client = rest.RESTClientObject(configuration)
|
|
||||||
self.default_headers = {}
|
|
||||||
if header_name is not None:
|
|
||||||
self.default_headers[header_name] = header_value
|
|
||||||
self.cookie = cookie
|
|
||||||
# Set default User-Agent.
|
|
||||||
self.user_agent = 'OpenAPI-Generator/1.0.0/python'
|
|
||||||
|
|
||||||
def __enter__(self):
|
|
||||||
return self
|
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_value, traceback):
|
|
||||||
self.close()
|
|
||||||
|
|
||||||
def close(self):
|
|
||||||
if self._pool:
|
|
||||||
self._pool.close()
|
|
||||||
self._pool.join()
|
|
||||||
self._pool = None
|
|
||||||
if hasattr(atexit, 'unregister'):
|
|
||||||
atexit.unregister(self.close)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def pool(self):
|
|
||||||
"""Create thread pool on first request
|
|
||||||
avoids instantiating unused threadpool for blocking clients.
|
|
||||||
"""
|
|
||||||
if self._pool is None:
|
|
||||||
atexit.register(self.close)
|
|
||||||
self._pool = ThreadPool(self.pool_threads)
|
|
||||||
return self._pool
|
|
||||||
|
|
||||||
@property
|
|
||||||
def user_agent(self):
|
|
||||||
"""User agent for this API client"""
|
|
||||||
return self.default_headers['User-Agent']
|
|
||||||
|
|
||||||
@user_agent.setter
|
|
||||||
def user_agent(self, value):
|
|
||||||
self.default_headers['User-Agent'] = value
|
|
||||||
|
|
||||||
def set_default_header(self, header_name, header_value):
|
|
||||||
self.default_headers[header_name] = header_value
|
|
||||||
|
|
||||||
def __call_api(
|
|
||||||
self,
|
|
||||||
resource_path: str,
|
|
||||||
method: str,
|
|
||||||
path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
|
|
||||||
query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
|
|
||||||
header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
|
|
||||||
body: typing.Optional[typing.Any] = None,
|
|
||||||
post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
|
|
||||||
files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
|
|
||||||
response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
|
|
||||||
auth_settings: typing.Optional[typing.List[str]] = None,
|
|
||||||
_return_http_data_only: typing.Optional[bool] = None,
|
|
||||||
collection_formats: typing.Optional[typing.Dict[str, str]] = None,
|
|
||||||
_preload_content: bool = True,
|
|
||||||
_request_timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
|
|
||||||
_host: typing.Optional[str] = None,
|
|
||||||
_check_type: typing.Optional[bool] = None
|
|
||||||
):
|
|
||||||
|
|
||||||
config = self.configuration
|
|
||||||
|
|
||||||
# header parameters
|
|
||||||
header_params = header_params or {}
|
|
||||||
header_params.update(self.default_headers)
|
|
||||||
if self.cookie:
|
|
||||||
header_params['Cookie'] = self.cookie
|
|
||||||
if header_params:
|
|
||||||
header_params = self.sanitize_for_serialization(header_params)
|
|
||||||
header_params = dict(self.parameters_to_tuples(header_params,
|
|
||||||
collection_formats))
|
|
||||||
|
|
||||||
# path parameters
|
|
||||||
if path_params:
|
|
||||||
path_params = self.sanitize_for_serialization(path_params)
|
|
||||||
path_params = self.parameters_to_tuples(path_params,
|
|
||||||
collection_formats)
|
|
||||||
for k, v in path_params:
|
|
||||||
# specified safe chars, encode everything
|
|
||||||
resource_path = resource_path.replace(
|
|
||||||
'{%s}' % k,
|
|
||||||
quote(str(v), safe=config.safe_chars_for_path_param)
|
|
||||||
)
|
|
||||||
|
|
||||||
# query parameters
|
|
||||||
if query_params:
|
|
||||||
query_params = self.sanitize_for_serialization(query_params)
|
|
||||||
query_params = self.parameters_to_tuples(query_params,
|
|
||||||
collection_formats)
|
|
||||||
|
|
||||||
# post parameters
|
|
||||||
if post_params or files:
|
|
||||||
post_params = post_params if post_params else []
|
|
||||||
post_params = self.sanitize_for_serialization(post_params)
|
|
||||||
post_params = self.parameters_to_tuples(post_params,
|
|
||||||
collection_formats)
|
|
||||||
post_params.extend(self.files_parameters(files))
|
|
||||||
|
|
||||||
# body
|
|
||||||
if body:
|
|
||||||
body = self.sanitize_for_serialization(body)
|
|
||||||
|
|
||||||
# auth setting
|
|
||||||
self.update_params_for_auth(header_params, query_params,
|
|
||||||
auth_settings, resource_path, method, body)
|
|
||||||
|
|
||||||
# request url
|
|
||||||
if _host is None:
|
|
||||||
url = self.configuration.host + resource_path
|
|
||||||
else:
|
|
||||||
# use server/host defined in path or operation instead
|
|
||||||
url = _host + resource_path
|
|
||||||
|
|
||||||
try:
|
|
||||||
# perform request and return response
|
|
||||||
response_data = self.request(
|
|
||||||
method, url, query_params=query_params, headers=header_params,
|
|
||||||
post_params=post_params, body=body,
|
|
||||||
_preload_content=_preload_content,
|
|
||||||
_request_timeout=_request_timeout)
|
|
||||||
except ApiException as e:
|
|
||||||
e.body = e.body.decode('utf-8')
|
|
||||||
raise e
|
|
||||||
|
|
||||||
content_type = response_data.getheader('content-type')
|
|
||||||
|
|
||||||
self.last_response = response_data
|
|
||||||
|
|
||||||
return_data = response_data
|
|
||||||
|
|
||||||
if not _preload_content:
|
|
||||||
return (return_data)
|
|
||||||
return return_data
|
|
||||||
|
|
||||||
if response_type not in ["file", "bytes"]:
|
|
||||||
match = None
|
|
||||||
if content_type is not None:
|
|
||||||
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
|
|
||||||
encoding = match.group(1) if match else "utf-8"
|
|
||||||
response_data.data = response_data.data.decode(encoding)
|
|
||||||
|
|
||||||
# deserialize response data
|
|
||||||
if response_type:
|
|
||||||
return_data = self.deserialize(
|
|
||||||
response_data,
|
|
||||||
response_type,
|
|
||||||
_check_type
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
return_data = None
|
|
||||||
|
|
||||||
if _return_http_data_only:
|
|
||||||
return (return_data)
|
|
||||||
else:
|
|
||||||
return (return_data, response_data.status,
|
|
||||||
response_data.getheaders())
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def sanitize_for_serialization(cls, obj):
|
|
||||||
"""Builds a JSON POST object.
|
|
||||||
If obj is None, return None.
|
|
||||||
If obj is str, int, long, float, bool, return directly.
|
|
||||||
If obj is datetime.datetime, datetime.date
|
|
||||||
convert to string in iso8601 format.
|
|
||||||
If obj is list, sanitize each element in the list.
|
|
||||||
If obj is dict, return the dict.
|
|
||||||
If obj is OpenAPI model, return the properties dict.
|
|
||||||
:param obj: The data to serialize.
|
|
||||||
:return: The serialized form of data.
|
|
||||||
"""
|
|
||||||
if isinstance(obj, (ModelNormal, ModelComposed)):
|
|
||||||
return {
|
|
||||||
key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items()
|
|
||||||
}
|
|
||||||
elif isinstance(obj, (str, int, float, none_type, bool)):
|
|
||||||
return obj
|
|
||||||
elif isinstance(obj, (datetime, date)):
|
|
||||||
return obj.isoformat()
|
|
||||||
elif isinstance(obj, ModelSimple):
|
|
||||||
return cls.sanitize_for_serialization(obj.value)
|
|
||||||
elif isinstance(obj, (list, tuple)):
|
|
||||||
return [cls.sanitize_for_serialization(item) for item in obj]
|
|
||||||
if isinstance(obj, dict):
|
|
||||||
return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()}
|
|
||||||
raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__))
|
|
||||||
|
|
||||||
def deserialize(self, response, response_type, _check_type):
|
|
||||||
"""Deserializes response into an object.
|
|
||||||
|
|
||||||
:param response: RESTResponse object to be deserialized.
|
|
||||||
:param response_type: For the response, a tuple containing:
|
|
||||||
valid classes
|
|
||||||
a list containing valid classes (for list schemas)
|
|
||||||
a dict containing a tuple of valid classes as the value
|
|
||||||
Example values:
|
|
||||||
(str,)
|
|
||||||
(Pet,)
|
|
||||||
(float, none_type)
|
|
||||||
([int, none_type],)
|
|
||||||
({str: (bool, str, int, float, date, datetime, str, none_type)},)
|
|
||||||
:param _check_type: boolean, whether to check the types of the data
|
|
||||||
received from the server
|
|
||||||
:type _check_type: bool
|
|
||||||
|
|
||||||
:return: deserialized object.
|
|
||||||
"""
|
|
||||||
# handle file downloading
|
|
||||||
# save response body into a tmp file and return the instance
|
|
||||||
if response_type == (file_type,):
|
|
||||||
content_disposition = response.getheader("Content-Disposition")
|
|
||||||
return deserialize_file(response.data, self.configuration,
|
|
||||||
content_disposition=content_disposition)
|
|
||||||
|
|
||||||
# fetch data from response object
|
|
||||||
try:
|
|
||||||
received_data = json.loads(response.data)
|
|
||||||
except ValueError:
|
|
||||||
received_data = response.data
|
|
||||||
|
|
||||||
# store our data under the key of 'received_data' so users have some
|
|
||||||
# context if they are deserializing a string and the data type is wrong
|
|
||||||
deserialized_data = validate_and_convert_types(
|
|
||||||
received_data,
|
|
||||||
response_type,
|
|
||||||
['received_data'],
|
|
||||||
True,
|
|
||||||
_check_type,
|
|
||||||
configuration=self.configuration
|
|
||||||
)
|
|
||||||
return deserialized_data
|
|
||||||
|
|
||||||
def call_api(
|
|
||||||
self,
|
|
||||||
resource_path: str,
|
|
||||||
method: str,
|
|
||||||
path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
|
|
||||||
query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
|
|
||||||
header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
|
|
||||||
body: typing.Optional[typing.Any] = None,
|
|
||||||
post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
|
|
||||||
files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
|
|
||||||
response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
|
|
||||||
auth_settings: typing.Optional[typing.List[str]] = None,
|
|
||||||
async_req: typing.Optional[bool] = None,
|
|
||||||
_return_http_data_only: typing.Optional[bool] = None,
|
|
||||||
collection_formats: typing.Optional[typing.Dict[str, str]] = None,
|
|
||||||
_preload_content: bool = True,
|
|
||||||
_request_timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
|
|
||||||
_host: typing.Optional[str] = None,
|
|
||||||
_check_type: typing.Optional[bool] = None
|
|
||||||
):
|
|
||||||
"""Makes the HTTP request (synchronous) and returns deserialized data.
|
|
||||||
|
|
||||||
To make an async_req request, set the async_req parameter.
|
|
||||||
|
|
||||||
:param resource_path: Path to method endpoint.
|
|
||||||
:param method: Method to call.
|
|
||||||
:param path_params: Path parameters in the url.
|
|
||||||
:param query_params: Query parameters in the url.
|
|
||||||
:param header_params: Header parameters to be
|
|
||||||
placed in the request header.
|
|
||||||
:param body: Request body.
|
|
||||||
:param post_params dict: Request post form parameters,
|
|
||||||
for `application/x-www-form-urlencoded`, `multipart/form-data`.
|
|
||||||
:param auth_settings list: Auth Settings names for the request.
|
|
||||||
:param response_type: For the response, a tuple containing:
|
|
||||||
valid classes
|
|
||||||
a list containing valid classes (for list schemas)
|
|
||||||
a dict containing a tuple of valid classes as the value
|
|
||||||
Example values:
|
|
||||||
(str,)
|
|
||||||
(Pet,)
|
|
||||||
(float, none_type)
|
|
||||||
([int, none_type],)
|
|
||||||
({str: (bool, str, int, float, date, datetime, str, none_type)},)
|
|
||||||
:param files: key -> field name, value -> a list of open file
|
|
||||||
objects for `multipart/form-data`.
|
|
||||||
:type files: dict
|
|
||||||
:param async_req bool: execute request asynchronously
|
|
||||||
:type async_req: bool, optional
|
|
||||||
:param _return_http_data_only: response data without head status code
|
|
||||||
and headers
|
|
||||||
:type _return_http_data_only: bool, optional
|
|
||||||
:param collection_formats: dict of collection formats for path, query,
|
|
||||||
header, and post parameters.
|
|
||||||
:type collection_formats: dict, optional
|
|
||||||
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
|
||||||
be returned without reading/decoding response
|
|
||||||
data. Default is True.
|
|
||||||
:type _preload_content: bool, optional
|
|
||||||
:param _request_timeout: timeout setting for this request. If one
|
|
||||||
number provided, it will be total request
|
|
||||||
timeout. It can also be a pair (tuple) of
|
|
||||||
(connection, read) timeouts.
|
|
||||||
:param _check_type: boolean describing if the data back from the server
|
|
||||||
should have its type checked.
|
|
||||||
:type _check_type: bool, optional
|
|
||||||
:return:
|
|
||||||
If async_req parameter is True,
|
|
||||||
the request will be called asynchronously.
|
|
||||||
The method will return the request thread.
|
|
||||||
If parameter async_req is False or missing,
|
|
||||||
then the method will return the response directly.
|
|
||||||
"""
|
|
||||||
if not async_req:
|
|
||||||
return self.__call_api(resource_path, method,
|
|
||||||
path_params, query_params, header_params,
|
|
||||||
body, post_params, files,
|
|
||||||
response_type, auth_settings,
|
|
||||||
_return_http_data_only, collection_formats,
|
|
||||||
_preload_content, _request_timeout, _host,
|
|
||||||
_check_type)
|
|
||||||
|
|
||||||
return self.pool.apply_async(self.__call_api, (resource_path,
|
|
||||||
method, path_params,
|
|
||||||
query_params,
|
|
||||||
header_params, body,
|
|
||||||
post_params, files,
|
|
||||||
response_type,
|
|
||||||
auth_settings,
|
|
||||||
_return_http_data_only,
|
|
||||||
collection_formats,
|
|
||||||
_preload_content,
|
|
||||||
_request_timeout,
|
|
||||||
_host, _check_type))
|
|
||||||
|
|
||||||
def request(self, method, url, query_params=None, headers=None,
|
|
||||||
post_params=None, body=None, _preload_content=True,
|
|
||||||
_request_timeout=None):
|
|
||||||
"""Makes the HTTP request using RESTClient."""
|
|
||||||
if method == "GET":
|
|
||||||
return self.rest_client.GET(url,
|
|
||||||
query_params=query_params,
|
|
||||||
_preload_content=_preload_content,
|
|
||||||
_request_timeout=_request_timeout,
|
|
||||||
headers=headers)
|
|
||||||
elif method == "HEAD":
|
|
||||||
return self.rest_client.HEAD(url,
|
|
||||||
query_params=query_params,
|
|
||||||
_preload_content=_preload_content,
|
|
||||||
_request_timeout=_request_timeout,
|
|
||||||
headers=headers)
|
|
||||||
elif method == "OPTIONS":
|
|
||||||
return self.rest_client.OPTIONS(url,
|
|
||||||
query_params=query_params,
|
|
||||||
headers=headers,
|
|
||||||
post_params=post_params,
|
|
||||||
_preload_content=_preload_content,
|
|
||||||
_request_timeout=_request_timeout,
|
|
||||||
body=body)
|
|
||||||
elif method == "POST":
|
|
||||||
return self.rest_client.POST(url,
|
|
||||||
query_params=query_params,
|
|
||||||
headers=headers,
|
|
||||||
post_params=post_params,
|
|
||||||
_preload_content=_preload_content,
|
|
||||||
_request_timeout=_request_timeout,
|
|
||||||
body=body)
|
|
||||||
elif method == "PUT":
|
|
||||||
return self.rest_client.PUT(url,
|
|
||||||
query_params=query_params,
|
|
||||||
headers=headers,
|
|
||||||
post_params=post_params,
|
|
||||||
_preload_content=_preload_content,
|
|
||||||
_request_timeout=_request_timeout,
|
|
||||||
body=body)
|
|
||||||
elif method == "PATCH":
|
|
||||||
return self.rest_client.PATCH(url,
|
|
||||||
query_params=query_params,
|
|
||||||
headers=headers,
|
|
||||||
post_params=post_params,
|
|
||||||
_preload_content=_preload_content,
|
|
||||||
_request_timeout=_request_timeout,
|
|
||||||
body=body)
|
|
||||||
elif method == "DELETE":
|
|
||||||
return self.rest_client.DELETE(url,
|
|
||||||
query_params=query_params,
|
|
||||||
headers=headers,
|
|
||||||
_preload_content=_preload_content,
|
|
||||||
_request_timeout=_request_timeout,
|
|
||||||
body=body)
|
|
||||||
else:
|
|
||||||
raise ApiValueError(
|
|
||||||
"http method must be `GET`, `HEAD`, `OPTIONS`,"
|
|
||||||
" `POST`, `PATCH`, `PUT` or `DELETE`."
|
|
||||||
)
|
|
||||||
|
|
||||||
def parameters_to_tuples(self, params, collection_formats):
|
|
||||||
"""Get parameters as list of tuples, formatting collections.
|
|
||||||
|
|
||||||
:param params: Parameters as dict or list of two-tuples
|
|
||||||
:param dict collection_formats: Parameter collection formats
|
|
||||||
:return: Parameters as list of tuples, collections formatted
|
|
||||||
"""
|
|
||||||
new_params = []
|
|
||||||
if collection_formats is None:
|
|
||||||
collection_formats = {}
|
|
||||||
for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
|
|
||||||
if k in collection_formats:
|
|
||||||
collection_format = collection_formats[k]
|
|
||||||
if collection_format == 'multi':
|
|
||||||
new_params.extend((k, value) for value in v)
|
|
||||||
else:
|
|
||||||
if collection_format == 'ssv':
|
|
||||||
delimiter = ' '
|
|
||||||
elif collection_format == 'tsv':
|
|
||||||
delimiter = '\t'
|
|
||||||
elif collection_format == 'pipes':
|
|
||||||
delimiter = '|'
|
|
||||||
else: # csv is the default
|
|
||||||
delimiter = ','
|
|
||||||
new_params.append(
|
|
||||||
(k, delimiter.join(str(value) for value in v)))
|
|
||||||
else:
|
|
||||||
new_params.append((k, v))
|
|
||||||
return new_params
|
|
||||||
|
|
||||||
def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None):
|
|
||||||
"""Builds form parameters.
|
|
||||||
|
|
||||||
:param files: None or a dict with key=param_name and
|
|
||||||
value is a list of open file objects
|
|
||||||
:return: List of tuples of form parameters with file data
|
|
||||||
"""
|
|
||||||
if files is None:
|
|
||||||
return []
|
|
||||||
|
|
||||||
params = []
|
|
||||||
for param_name, file_instances in files.items():
|
|
||||||
if file_instances is None:
|
|
||||||
# if the file field is nullable, skip None values
|
|
||||||
continue
|
|
||||||
for file_instance in file_instances:
|
|
||||||
if file_instance is None:
|
|
||||||
# if the file field is nullable, skip None values
|
|
||||||
continue
|
|
||||||
if file_instance.closed is True:
|
|
||||||
raise ApiValueError(
|
|
||||||
"Cannot read a closed file. The passed in file_type "
|
|
||||||
"for %s must be open." % param_name
|
|
||||||
)
|
|
||||||
filename = os.path.basename(file_instance.name)
|
|
||||||
filedata = file_instance.read()
|
|
||||||
mimetype = (mimetypes.guess_type(filename)[0] or
|
|
||||||
'application/octet-stream')
|
|
||||||
params.append(
|
|
||||||
tuple([param_name, tuple([filename, filedata, mimetype])]))
|
|
||||||
file_instance.close()
|
|
||||||
|
|
||||||
return params
|
|
||||||
|
|
||||||
def select_header_accept(self, accepts):
|
|
||||||
"""Returns `Accept` based on an array of accepts provided.
|
|
||||||
|
|
||||||
:param accepts: List of headers.
|
|
||||||
:return: Accept (e.g. application/json).
|
|
||||||
"""
|
|
||||||
if not accepts:
|
|
||||||
return
|
|
||||||
|
|
||||||
accepts = [x.lower() for x in accepts]
|
|
||||||
|
|
||||||
if 'application/json' in accepts:
|
|
||||||
return 'application/json'
|
|
||||||
else:
|
|
||||||
return ', '.join(accepts)
|
|
||||||
|
|
||||||
def select_header_content_type(self, content_types):
|
|
||||||
"""Returns `Content-Type` based on an array of content_types provided.
|
|
||||||
|
|
||||||
:param content_types: List of content-types.
|
|
||||||
:return: Content-Type (e.g. application/json).
|
|
||||||
"""
|
|
||||||
if not content_types:
|
|
||||||
return 'application/json'
|
|
||||||
|
|
||||||
content_types = [x.lower() for x in content_types]
|
|
||||||
|
|
||||||
if 'application/json' in content_types or '*/*' in content_types:
|
|
||||||
return 'application/json'
|
|
||||||
else:
|
|
||||||
return content_types[0]
|
|
||||||
|
|
||||||
def update_params_for_auth(self, headers, querys, auth_settings,
|
|
||||||
resource_path, method, body):
|
|
||||||
"""Updates header and query params based on authentication setting.
|
|
||||||
|
|
||||||
:param headers: Header parameters dict to be updated.
|
|
||||||
:param querys: Query parameters tuple list to be updated.
|
|
||||||
:param auth_settings: Authentication setting identifiers list.
|
|
||||||
:param resource_path: A string representation of the HTTP request resource path.
|
|
||||||
:param method: A string representation of the HTTP request method.
|
|
||||||
:param body: A object representing the body of the HTTP request.
|
|
||||||
The object type is the return value of _encoder.default().
|
|
||||||
"""
|
|
||||||
if not auth_settings:
|
|
||||||
return
|
|
||||||
|
|
||||||
for auth in auth_settings:
|
|
||||||
auth_setting = self.configuration.auth_settings().get(auth)
|
|
||||||
if auth_setting:
|
|
||||||
if auth_setting['in'] == 'cookie':
|
|
||||||
headers['Cookie'] = auth_setting['value']
|
|
||||||
elif auth_setting['in'] == 'header':
|
|
||||||
if auth_setting['type'] != 'http-signature':
|
|
||||||
headers[auth_setting['key']] = auth_setting['value']
|
|
||||||
elif auth_setting['in'] == 'query':
|
|
||||||
querys.append((auth_setting['key'], auth_setting['value']))
|
|
||||||
else:
|
|
||||||
raise ApiValueError(
|
|
||||||
'Authentication token must be in `query` or `header`'
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Endpoint(object):
|
|
||||||
def __init__(self, settings=None, params_map=None, root_map=None,
|
|
||||||
headers_map=None, api_client=None, callable=None):
|
|
||||||
"""Creates an endpoint
|
|
||||||
|
|
||||||
Args:
|
|
||||||
settings (dict): see below key value pairs
|
|
||||||
'response_type' (tuple/None): response type
|
|
||||||
'auth' (list): a list of auth type keys
|
|
||||||
'endpoint_path' (str): the endpoint path
|
|
||||||
'operation_id' (str): endpoint string identifier
|
|
||||||
'http_method' (str): POST/PUT/PATCH/GET etc
|
|
||||||
'servers' (list): list of str servers that this endpoint is at
|
|
||||||
params_map (dict): see below key value pairs
|
|
||||||
'all' (list): list of str endpoint parameter names
|
|
||||||
'required' (list): list of required parameter names
|
|
||||||
'nullable' (list): list of nullable parameter names
|
|
||||||
'enum' (list): list of parameters with enum values
|
|
||||||
'validation' (list): list of parameters with validations
|
|
||||||
root_map
|
|
||||||
'validations' (dict): the dict mapping endpoint parameter tuple
|
|
||||||
paths to their validation dictionaries
|
|
||||||
'allowed_values' (dict): the dict mapping endpoint parameter
|
|
||||||
tuple paths to their allowed_values (enum) dictionaries
|
|
||||||
'openapi_types' (dict): param_name to openapi type
|
|
||||||
'attribute_map' (dict): param_name to camelCase name
|
|
||||||
'location_map' (dict): param_name to 'body', 'file', 'form',
|
|
||||||
'header', 'path', 'query'
|
|
||||||
collection_format_map (dict): param_name to `csv` etc.
|
|
||||||
headers_map (dict): see below key value pairs
|
|
||||||
'accept' (list): list of Accept header strings
|
|
||||||
'content_type' (list): list of Content-Type header strings
|
|
||||||
api_client (ApiClient) api client instance
|
|
||||||
callable (function): the function which is invoked when the
|
|
||||||
Endpoint is called
|
|
||||||
"""
|
|
||||||
self.settings = settings
|
|
||||||
self.params_map = params_map
|
|
||||||
self.params_map['all'].extend([
|
|
||||||
'async_req',
|
|
||||||
'_host_index',
|
|
||||||
'_preload_content',
|
|
||||||
'_request_timeout',
|
|
||||||
'_return_http_data_only',
|
|
||||||
'_check_input_type',
|
|
||||||
'_check_return_type'
|
|
||||||
])
|
|
||||||
self.params_map['nullable'].extend(['_request_timeout'])
|
|
||||||
self.validations = root_map['validations']
|
|
||||||
self.allowed_values = root_map['allowed_values']
|
|
||||||
self.openapi_types = root_map['openapi_types']
|
|
||||||
extra_types = {
|
|
||||||
'async_req': (bool,),
|
|
||||||
'_host_index': (none_type, int),
|
|
||||||
'_preload_content': (bool,),
|
|
||||||
'_request_timeout': (none_type, int, (int,), [int]),
|
|
||||||
'_return_http_data_only': (bool,),
|
|
||||||
'_check_input_type': (bool,),
|
|
||||||
'_check_return_type': (bool,)
|
|
||||||
}
|
|
||||||
self.openapi_types.update(extra_types)
|
|
||||||
self.attribute_map = root_map['attribute_map']
|
|
||||||
self.location_map = root_map['location_map']
|
|
||||||
self.collection_format_map = root_map['collection_format_map']
|
|
||||||
self.headers_map = headers_map
|
|
||||||
self.api_client = api_client
|
|
||||||
self.callable = callable
|
|
||||||
|
|
||||||
def __validate_inputs(self, kwargs):
|
|
||||||
for param in self.params_map['enum']:
|
|
||||||
if param in kwargs:
|
|
||||||
check_allowed_values(
|
|
||||||
self.allowed_values,
|
|
||||||
(param,),
|
|
||||||
kwargs[param]
|
|
||||||
)
|
|
||||||
|
|
||||||
for param in self.params_map['validation']:
|
|
||||||
if param in kwargs:
|
|
||||||
check_validations(
|
|
||||||
self.validations,
|
|
||||||
(param,),
|
|
||||||
kwargs[param],
|
|
||||||
configuration=self.api_client.configuration
|
|
||||||
)
|
|
||||||
|
|
||||||
if kwargs['_check_input_type'] is False:
|
|
||||||
return
|
|
||||||
|
|
||||||
for key, value in kwargs.items():
|
|
||||||
fixed_val = validate_and_convert_types(
|
|
||||||
value,
|
|
||||||
self.openapi_types[key],
|
|
||||||
[key],
|
|
||||||
False,
|
|
||||||
kwargs['_check_input_type'],
|
|
||||||
configuration=self.api_client.configuration
|
|
||||||
)
|
|
||||||
kwargs[key] = fixed_val
|
|
||||||
|
|
||||||
def __gather_params(self, kwargs):
|
|
||||||
params = {
|
|
||||||
'body': None,
|
|
||||||
'collection_format': {},
|
|
||||||
'file': {},
|
|
||||||
'form': [],
|
|
||||||
'header': {},
|
|
||||||
'path': {},
|
|
||||||
'query': []
|
|
||||||
}
|
|
||||||
|
|
||||||
for param_name, param_value in kwargs.items():
|
|
||||||
param_location = self.location_map.get(param_name)
|
|
||||||
if param_location is None:
|
|
||||||
continue
|
|
||||||
if param_location:
|
|
||||||
if param_location == 'body':
|
|
||||||
params['body'] = param_value
|
|
||||||
continue
|
|
||||||
base_name = self.attribute_map[param_name]
|
|
||||||
if (param_location == 'form' and
|
|
||||||
self.openapi_types[param_name] == (file_type,)):
|
|
||||||
params['file'][param_name] = [param_value]
|
|
||||||
elif (param_location == 'form' and
|
|
||||||
self.openapi_types[param_name] == ([file_type],)):
|
|
||||||
# param_value is already a list
|
|
||||||
params['file'][param_name] = param_value
|
|
||||||
elif param_location in {'form', 'query'}:
|
|
||||||
param_value_full = (base_name, param_value)
|
|
||||||
params[param_location].append(param_value_full)
|
|
||||||
if param_location not in {'form', 'query'}:
|
|
||||||
params[param_location][base_name] = param_value
|
|
||||||
collection_format = self.collection_format_map.get(param_name)
|
|
||||||
if collection_format:
|
|
||||||
params['collection_format'][base_name] = collection_format
|
|
||||||
|
|
||||||
return params
|
|
||||||
|
|
||||||
def __call__(self, *args, **kwargs):
|
|
||||||
""" This method is invoked when endpoints are called
|
|
||||||
Example:
|
|
||||||
|
|
||||||
api_instance = CollectionsApi()
|
|
||||||
api_instance.get_collection # this is an instance of the class Endpoint
|
|
||||||
api_instance.get_collection() # this invokes api_instance.get_collection.__call__()
|
|
||||||
which then invokes the callable functions stored in that endpoint at
|
|
||||||
api_instance.get_collection.callable or self.callable in this class
|
|
||||||
|
|
||||||
"""
|
|
||||||
return self.callable(self, *args, **kwargs)
|
|
||||||
|
|
||||||
def call_with_http_info(self, **kwargs):
|
|
||||||
|
|
||||||
try:
|
|
||||||
index = self.api_client.configuration.server_operation_index.get(
|
|
||||||
self.settings['operation_id'], self.api_client.configuration.server_index
|
|
||||||
) if kwargs['_host_index'] is None else kwargs['_host_index']
|
|
||||||
server_variables = self.api_client.configuration.server_operation_variables.get(
|
|
||||||
self.settings['operation_id'], self.api_client.configuration.server_variables
|
|
||||||
)
|
|
||||||
_host = self.api_client.configuration.get_host_from_settings(
|
|
||||||
index, variables=server_variables, servers=self.settings['servers']
|
|
||||||
)
|
|
||||||
except IndexError:
|
|
||||||
if self.settings['servers']:
|
|
||||||
raise ApiValueError(
|
|
||||||
"Invalid host index. Must be 0 <= index < %s" %
|
|
||||||
len(self.settings['servers'])
|
|
||||||
)
|
|
||||||
_host = None
|
|
||||||
|
|
||||||
for key, value in kwargs.items():
|
|
||||||
if key not in self.params_map['all']:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Got an unexpected parameter '%s'"
|
|
||||||
" to method `%s`" %
|
|
||||||
(key, self.settings['operation_id'])
|
|
||||||
)
|
|
||||||
# only throw this nullable ApiValueError if _check_input_type
|
|
||||||
# is False, if _check_input_type==True we catch this case
|
|
||||||
# in self.__validate_inputs
|
|
||||||
if (key not in self.params_map['nullable'] and value is None
|
|
||||||
and kwargs['_check_input_type'] is False):
|
|
||||||
raise ApiValueError(
|
|
||||||
"Value may not be None for non-nullable parameter `%s`"
|
|
||||||
" when calling `%s`" %
|
|
||||||
(key, self.settings['operation_id'])
|
|
||||||
)
|
|
||||||
|
|
||||||
for key in self.params_map['required']:
|
|
||||||
if key not in kwargs.keys():
|
|
||||||
raise ApiValueError(
|
|
||||||
"Missing the required parameter `%s` when calling "
|
|
||||||
"`%s`" % (key, self.settings['operation_id'])
|
|
||||||
)
|
|
||||||
|
|
||||||
self.__validate_inputs(kwargs)
|
|
||||||
|
|
||||||
params = self.__gather_params(kwargs)
|
|
||||||
|
|
||||||
accept_headers_list = self.headers_map['accept']
|
|
||||||
if accept_headers_list:
|
|
||||||
params['header']['Accept'] = self.api_client.select_header_accept(
|
|
||||||
accept_headers_list)
|
|
||||||
|
|
||||||
content_type_headers_list = self.headers_map['content_type']
|
|
||||||
if content_type_headers_list:
|
|
||||||
header_list = self.api_client.select_header_content_type(
|
|
||||||
content_type_headers_list)
|
|
||||||
params['header']['Content-Type'] = header_list
|
|
||||||
|
|
||||||
return self.api_client.call_api(
|
|
||||||
self.settings['endpoint_path'], self.settings['http_method'],
|
|
||||||
params['path'],
|
|
||||||
params['query'],
|
|
||||||
params['header'],
|
|
||||||
body=params['body'],
|
|
||||||
post_params=params['form'],
|
|
||||||
files=params['file'],
|
|
||||||
response_type=self.settings['response_type'],
|
|
||||||
auth_settings=self.settings['auth'],
|
|
||||||
async_req=kwargs['async_req'],
|
|
||||||
_check_type=kwargs['_check_return_type'],
|
|
||||||
_return_http_data_only=kwargs['_return_http_data_only'],
|
|
||||||
_preload_content=kwargs['_preload_content'],
|
|
||||||
_request_timeout=kwargs['_request_timeout'],
|
|
||||||
_host=_host,
|
|
||||||
collection_formats=params['collection_format'])
|
|
|
@ -1,19 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
# flake8: noqa
|
|
||||||
|
|
||||||
# Import all APIs into this package.
|
|
||||||
# If you have many APIs here with many many models used in each API this may
|
|
||||||
# raise a `RecursionError`.
|
|
||||||
# In order to avoid this, import only the API that you directly need like:
|
|
||||||
#
|
|
||||||
# from .api.collections_api import CollectionsApi
|
|
||||||
#
|
|
||||||
# or import this package, but before doing it, use:
|
|
||||||
#
|
|
||||||
# import sys
|
|
||||||
# sys.setrecursionlimit(n)
|
|
||||||
|
|
||||||
# Import APIs into API package:
|
|
||||||
from openapi_client.api.collections_api import CollectionsApi
|
|
||||||
from openapi_client.api.points_api import PointsApi
|
|
|
@ -1,441 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import copy
|
|
||||||
import logging
|
|
||||||
import multiprocessing
|
|
||||||
import sys
|
|
||||||
import urllib3
|
|
||||||
|
|
||||||
from http import client as http_client
|
|
||||||
from openapi_client.exceptions import ApiValueError
|
|
||||||
|
|
||||||
|
|
||||||
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
|
||||||
'multipleOf', 'maximum', 'exclusiveMaximum',
|
|
||||||
'minimum', 'exclusiveMinimum', 'maxLength',
|
|
||||||
'minLength', 'pattern', 'maxItems', 'minItems'
|
|
||||||
}
|
|
||||||
|
|
||||||
class Configuration(object):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
||||||
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
:param host: Base url
|
|
||||||
:param api_key: Dict to store API key(s).
|
|
||||||
Each entry in the dict specifies an API key.
|
|
||||||
The dict key is the name of the security scheme in the OAS specification.
|
|
||||||
The dict value is the API key secret.
|
|
||||||
:param api_key_prefix: Dict to store API prefix (e.g. Bearer)
|
|
||||||
The dict key is the name of the security scheme in the OAS specification.
|
|
||||||
The dict value is an API key prefix when generating the auth data.
|
|
||||||
:param username: Username for HTTP basic authentication
|
|
||||||
:param password: Password for HTTP basic authentication
|
|
||||||
:param discard_unknown_keys: Boolean value indicating whether to discard
|
|
||||||
unknown properties. A server may send a response that includes additional
|
|
||||||
properties that are not known by the client in the following scenarios:
|
|
||||||
1. The OpenAPI document is incomplete, i.e. it does not match the server
|
|
||||||
implementation.
|
|
||||||
2. The client was generated using an older version of the OpenAPI document
|
|
||||||
and the server has been upgraded since then.
|
|
||||||
If a schema in the OpenAPI document defines the additionalProperties attribute,
|
|
||||||
then all undeclared properties received by the server are injected into the
|
|
||||||
additional properties map. In that case, there are undeclared properties, and
|
|
||||||
nothing to discard.
|
|
||||||
:param disabled_client_side_validations (string): Comma-separated list of
|
|
||||||
JSON schema validation keywords to disable JSON schema structural validation
|
|
||||||
rules. The following keywords may be specified: multipleOf, maximum,
|
|
||||||
exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern,
|
|
||||||
maxItems, minItems.
|
|
||||||
By default, the validation is performed for data generated locally by the client
|
|
||||||
and data received from the server, independent of any validation performed by
|
|
||||||
the server side. If the input data does not satisfy the JSON schema validation
|
|
||||||
rules specified in the OpenAPI document, an exception is raised.
|
|
||||||
If disabled_client_side_validations is set, structural validation is
|
|
||||||
disabled. This can be useful to troubleshoot data validation problem, such as
|
|
||||||
when the OpenAPI document validation rules do not match the actual API data
|
|
||||||
received by the server.
|
|
||||||
:param server_index: Index to servers configuration.
|
|
||||||
:param server_variables: Mapping with string values to replace variables in
|
|
||||||
templated server configuration. The validation of enums is performed for
|
|
||||||
variables with defined enum values before.
|
|
||||||
:param server_operation_index: Mapping from operation ID to an index to server
|
|
||||||
configuration.
|
|
||||||
:param server_operation_variables: Mapping from operation ID to a mapping with
|
|
||||||
string values to replace variables in templated server configuration.
|
|
||||||
The validation of enums is performed for variables with defined enum values before.
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
_default = None
|
|
||||||
|
|
||||||
def __init__(self, host=None,
|
|
||||||
api_key=None, api_key_prefix=None,
|
|
||||||
username=None, password=None,
|
|
||||||
discard_unknown_keys=False,
|
|
||||||
disabled_client_side_validations="",
|
|
||||||
server_index=None, server_variables=None,
|
|
||||||
server_operation_index=None, server_operation_variables=None,
|
|
||||||
):
|
|
||||||
"""Constructor
|
|
||||||
"""
|
|
||||||
self._base_path = "http://localhost:6333" if host is None else host
|
|
||||||
"""Default Base url
|
|
||||||
"""
|
|
||||||
self.server_index = 0 if server_index is None and host is None else server_index
|
|
||||||
self.server_operation_index = server_operation_index or {}
|
|
||||||
"""Default server index
|
|
||||||
"""
|
|
||||||
self.server_variables = server_variables or {}
|
|
||||||
self.server_operation_variables = server_operation_variables or {}
|
|
||||||
"""Default server variables
|
|
||||||
"""
|
|
||||||
self.temp_folder_path = None
|
|
||||||
"""Temp file folder for downloading files
|
|
||||||
"""
|
|
||||||
# Authentication Settings
|
|
||||||
self.api_key = {}
|
|
||||||
if api_key:
|
|
||||||
self.api_key = api_key
|
|
||||||
"""dict to store API key(s)
|
|
||||||
"""
|
|
||||||
self.api_key_prefix = {}
|
|
||||||
if api_key_prefix:
|
|
||||||
self.api_key_prefix = api_key_prefix
|
|
||||||
"""dict to store API prefix (e.g. Bearer)
|
|
||||||
"""
|
|
||||||
self.refresh_api_key_hook = None
|
|
||||||
"""function hook to refresh API key if expired
|
|
||||||
"""
|
|
||||||
self.username = username
|
|
||||||
"""Username for HTTP basic authentication
|
|
||||||
"""
|
|
||||||
self.password = password
|
|
||||||
"""Password for HTTP basic authentication
|
|
||||||
"""
|
|
||||||
self.discard_unknown_keys = discard_unknown_keys
|
|
||||||
self.disabled_client_side_validations = disabled_client_side_validations
|
|
||||||
self.logger = {}
|
|
||||||
"""Logging Settings
|
|
||||||
"""
|
|
||||||
self.logger["package_logger"] = logging.getLogger("openapi_client")
|
|
||||||
self.logger["urllib3_logger"] = logging.getLogger("urllib3")
|
|
||||||
self.logger_format = '%(asctime)s %(levelname)s %(message)s'
|
|
||||||
"""Log format
|
|
||||||
"""
|
|
||||||
self.logger_stream_handler = None
|
|
||||||
"""Log stream handler
|
|
||||||
"""
|
|
||||||
self.logger_file_handler = None
|
|
||||||
"""Log file handler
|
|
||||||
"""
|
|
||||||
self.logger_file = None
|
|
||||||
"""Debug file location
|
|
||||||
"""
|
|
||||||
self.debug = False
|
|
||||||
"""Debug switch
|
|
||||||
"""
|
|
||||||
|
|
||||||
self.verify_ssl = True
|
|
||||||
"""SSL/TLS verification
|
|
||||||
Set this to false to skip verifying SSL certificate when calling API
|
|
||||||
from https server.
|
|
||||||
"""
|
|
||||||
self.ssl_ca_cert = None
|
|
||||||
"""Set this to customize the certificate file to verify the peer.
|
|
||||||
"""
|
|
||||||
self.cert_file = None
|
|
||||||
"""client certificate file
|
|
||||||
"""
|
|
||||||
self.key_file = None
|
|
||||||
"""client key file
|
|
||||||
"""
|
|
||||||
self.assert_hostname = None
|
|
||||||
"""Set this to True/False to enable/disable SSL hostname verification.
|
|
||||||
"""
|
|
||||||
|
|
||||||
self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
|
|
||||||
"""urllib3 connection pool's maximum number of connections saved
|
|
||||||
per pool. urllib3 uses 1 connection as default value, but this is
|
|
||||||
not the best value when you are making a lot of possibly parallel
|
|
||||||
requests to the same host, which is often the case here.
|
|
||||||
cpu_count * 5 is used as default value to increase performance.
|
|
||||||
"""
|
|
||||||
|
|
||||||
self.proxy = None
|
|
||||||
"""Proxy URL
|
|
||||||
"""
|
|
||||||
self.proxy_headers = None
|
|
||||||
"""Proxy headers
|
|
||||||
"""
|
|
||||||
self.safe_chars_for_path_param = ''
|
|
||||||
"""Safe chars for path_param
|
|
||||||
"""
|
|
||||||
self.retries = None
|
|
||||||
"""Adding retries to override urllib3 default value 3
|
|
||||||
"""
|
|
||||||
# Enable client side validation
|
|
||||||
self.client_side_validation = True
|
|
||||||
|
|
||||||
# Options to pass down to the underlying urllib3 socket
|
|
||||||
self.socket_options = None
|
|
||||||
|
|
||||||
def __deepcopy__(self, memo):
|
|
||||||
cls = self.__class__
|
|
||||||
result = cls.__new__(cls)
|
|
||||||
memo[id(self)] = result
|
|
||||||
for k, v in self.__dict__.items():
|
|
||||||
if k not in ('logger', 'logger_file_handler'):
|
|
||||||
setattr(result, k, copy.deepcopy(v, memo))
|
|
||||||
# shallow copy of loggers
|
|
||||||
result.logger = copy.copy(self.logger)
|
|
||||||
# use setters to configure loggers
|
|
||||||
result.logger_file = self.logger_file
|
|
||||||
result.debug = self.debug
|
|
||||||
return result
|
|
||||||
|
|
||||||
def __setattr__(self, name, value):
|
|
||||||
object.__setattr__(self, name, value)
|
|
||||||
if name == 'disabled_client_side_validations':
|
|
||||||
s = set(filter(None, value.split(',')))
|
|
||||||
for v in s:
|
|
||||||
if v not in JSON_SCHEMA_VALIDATION_KEYWORDS:
|
|
||||||
raise ApiValueError(
|
|
||||||
"Invalid keyword: '{0}''".format(v))
|
|
||||||
self._disabled_client_side_validations = s
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def set_default(cls, default):
|
|
||||||
"""Set default instance of configuration.
|
|
||||||
|
|
||||||
It stores default configuration, which can be
|
|
||||||
returned by get_default_copy method.
|
|
||||||
|
|
||||||
:param default: object of Configuration
|
|
||||||
"""
|
|
||||||
cls._default = copy.deepcopy(default)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def get_default_copy(cls):
|
|
||||||
"""Return new instance of configuration.
|
|
||||||
|
|
||||||
This method returns newly created, based on default constructor,
|
|
||||||
object of Configuration class or returns a copy of default
|
|
||||||
configuration passed by the set_default method.
|
|
||||||
|
|
||||||
:return: The configuration object.
|
|
||||||
"""
|
|
||||||
if cls._default is not None:
|
|
||||||
return copy.deepcopy(cls._default)
|
|
||||||
return Configuration()
|
|
||||||
|
|
||||||
@property
|
|
||||||
def logger_file(self):
|
|
||||||
"""The logger file.
|
|
||||||
|
|
||||||
If the logger_file is None, then add stream handler and remove file
|
|
||||||
handler. Otherwise, add file handler and remove stream handler.
|
|
||||||
|
|
||||||
:param value: The logger_file path.
|
|
||||||
:type: str
|
|
||||||
"""
|
|
||||||
return self.__logger_file
|
|
||||||
|
|
||||||
@logger_file.setter
|
|
||||||
def logger_file(self, value):
|
|
||||||
"""The logger file.
|
|
||||||
|
|
||||||
If the logger_file is None, then add stream handler and remove file
|
|
||||||
handler. Otherwise, add file handler and remove stream handler.
|
|
||||||
|
|
||||||
:param value: The logger_file path.
|
|
||||||
:type: str
|
|
||||||
"""
|
|
||||||
self.__logger_file = value
|
|
||||||
if self.__logger_file:
|
|
||||||
# If set logging file,
|
|
||||||
# then add file handler and remove stream handler.
|
|
||||||
self.logger_file_handler = logging.FileHandler(self.__logger_file)
|
|
||||||
self.logger_file_handler.setFormatter(self.logger_formatter)
|
|
||||||
for _, logger in self.logger.items():
|
|
||||||
logger.addHandler(self.logger_file_handler)
|
|
||||||
|
|
||||||
@property
|
|
||||||
def debug(self):
|
|
||||||
"""Debug status
|
|
||||||
|
|
||||||
:param value: The debug status, True or False.
|
|
||||||
:type: bool
|
|
||||||
"""
|
|
||||||
return self.__debug
|
|
||||||
|
|
||||||
@debug.setter
|
|
||||||
def debug(self, value):
|
|
||||||
"""Debug status
|
|
||||||
|
|
||||||
:param value: The debug status, True or False.
|
|
||||||
:type: bool
|
|
||||||
"""
|
|
||||||
self.__debug = value
|
|
||||||
if self.__debug:
|
|
||||||
# if debug status is True, turn on debug logging
|
|
||||||
for _, logger in self.logger.items():
|
|
||||||
logger.setLevel(logging.DEBUG)
|
|
||||||
# turn on http_client debug
|
|
||||||
http_client.HTTPConnection.debuglevel = 1
|
|
||||||
else:
|
|
||||||
# if debug status is False, turn off debug logging,
|
|
||||||
# setting log level to default `logging.WARNING`
|
|
||||||
for _, logger in self.logger.items():
|
|
||||||
logger.setLevel(logging.WARNING)
|
|
||||||
# turn off http_client debug
|
|
||||||
http_client.HTTPConnection.debuglevel = 0
|
|
||||||
|
|
||||||
@property
|
|
||||||
def logger_format(self):
|
|
||||||
"""The logger format.
|
|
||||||
|
|
||||||
The logger_formatter will be updated when sets logger_format.
|
|
||||||
|
|
||||||
:param value: The format string.
|
|
||||||
:type: str
|
|
||||||
"""
|
|
||||||
return self.__logger_format
|
|
||||||
|
|
||||||
@logger_format.setter
|
|
||||||
def logger_format(self, value):
|
|
||||||
"""The logger format.
|
|
||||||
|
|
||||||
The logger_formatter will be updated when sets logger_format.
|
|
||||||
|
|
||||||
:param value: The format string.
|
|
||||||
:type: str
|
|
||||||
"""
|
|
||||||
self.__logger_format = value
|
|
||||||
self.logger_formatter = logging.Formatter(self.__logger_format)
|
|
||||||
|
|
||||||
def get_api_key_with_prefix(self, identifier, alias=None):
|
|
||||||
"""Gets API key (with prefix if set).
|
|
||||||
|
|
||||||
:param identifier: The identifier of apiKey.
|
|
||||||
:param alias: The alternative identifier of apiKey.
|
|
||||||
:return: The token for api key authentication.
|
|
||||||
"""
|
|
||||||
if self.refresh_api_key_hook is not None:
|
|
||||||
self.refresh_api_key_hook(self)
|
|
||||||
key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
|
|
||||||
if key:
|
|
||||||
prefix = self.api_key_prefix.get(identifier)
|
|
||||||
if prefix:
|
|
||||||
return "%s %s" % (prefix, key)
|
|
||||||
else:
|
|
||||||
return key
|
|
||||||
|
|
||||||
def get_basic_auth_token(self):
|
|
||||||
"""Gets HTTP basic authentication header (string).
|
|
||||||
|
|
||||||
:return: The token for basic HTTP authentication.
|
|
||||||
"""
|
|
||||||
username = ""
|
|
||||||
if self.username is not None:
|
|
||||||
username = self.username
|
|
||||||
password = ""
|
|
||||||
if self.password is not None:
|
|
||||||
password = self.password
|
|
||||||
return urllib3.util.make_headers(
|
|
||||||
basic_auth=username + ':' + password
|
|
||||||
).get('authorization')
|
|
||||||
|
|
||||||
def auth_settings(self):
|
|
||||||
"""Gets Auth Settings dict for api client.
|
|
||||||
|
|
||||||
:return: The Auth Settings information dict.
|
|
||||||
"""
|
|
||||||
auth = {}
|
|
||||||
return auth
|
|
||||||
|
|
||||||
def to_debug_report(self):
|
|
||||||
"""Gets the essential information for debugging.
|
|
||||||
|
|
||||||
:return: The report for debugging.
|
|
||||||
"""
|
|
||||||
return "Python SDK Debug Report:\n"\
|
|
||||||
"OS: {env}\n"\
|
|
||||||
"Python Version: {pyversion}\n"\
|
|
||||||
"Version of the API: 0.1.0\n"\
|
|
||||||
"SDK Package Version: 1.0.0".\
|
|
||||||
format(env=sys.platform, pyversion=sys.version)
|
|
||||||
|
|
||||||
def get_host_settings(self):
|
|
||||||
"""Gets an array of host settings
|
|
||||||
|
|
||||||
:return: An array of host settings
|
|
||||||
"""
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
'url': "http://localhost:6333",
|
|
||||||
'description': "No description provided",
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
def get_host_from_settings(self, index, variables=None, servers=None):
|
|
||||||
"""Gets host URL based on the index and variables
|
|
||||||
:param index: array index of the host settings
|
|
||||||
:param variables: hash of variable and the corresponding value
|
|
||||||
:param servers: an array of host settings or None
|
|
||||||
:return: URL based on host settings
|
|
||||||
"""
|
|
||||||
if index is None:
|
|
||||||
return self._base_path
|
|
||||||
|
|
||||||
variables = {} if variables is None else variables
|
|
||||||
servers = self.get_host_settings() if servers is None else servers
|
|
||||||
|
|
||||||
try:
|
|
||||||
server = servers[index]
|
|
||||||
except IndexError:
|
|
||||||
raise ValueError(
|
|
||||||
"Invalid index {0} when selecting the host settings. "
|
|
||||||
"Must be less than {1}".format(index, len(servers)))
|
|
||||||
|
|
||||||
url = server['url']
|
|
||||||
|
|
||||||
# go through variables and replace placeholders
|
|
||||||
for variable_name, variable in server.get('variables', {}).items():
|
|
||||||
used_value = variables.get(
|
|
||||||
variable_name, variable['default_value'])
|
|
||||||
|
|
||||||
if 'enum_values' in variable \
|
|
||||||
and used_value not in variable['enum_values']:
|
|
||||||
raise ValueError(
|
|
||||||
"The variable `{0}` in the host URL has invalid value "
|
|
||||||
"{1}. Must be {2}.".format(
|
|
||||||
variable_name, variables[variable_name],
|
|
||||||
variable['enum_values']))
|
|
||||||
|
|
||||||
url = url.replace("{" + variable_name + "}", used_value)
|
|
||||||
|
|
||||||
return url
|
|
||||||
|
|
||||||
@property
|
|
||||||
def host(self):
|
|
||||||
"""Return generated host."""
|
|
||||||
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
|
|
||||||
|
|
||||||
@host.setter
|
|
||||||
def host(self, value):
|
|
||||||
"""Fix base path."""
|
|
||||||
self._base_path = value
|
|
||||||
self.server_index = None
|
|
|
@ -1,138 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class OpenApiException(Exception):
|
|
||||||
"""The base exception class for all OpenAPIExceptions"""
|
|
||||||
|
|
||||||
|
|
||||||
class ApiTypeError(OpenApiException, TypeError):
|
|
||||||
def __init__(self, msg, path_to_item=None, valid_classes=None,
|
|
||||||
key_type=None):
|
|
||||||
""" Raises an exception for TypeErrors
|
|
||||||
|
|
||||||
Args:
|
|
||||||
msg (str): the exception message
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
path_to_item (list): a list of keys an indices to get to the
|
|
||||||
current_item
|
|
||||||
None if unset
|
|
||||||
valid_classes (tuple): the primitive classes that current item
|
|
||||||
should be an instance of
|
|
||||||
None if unset
|
|
||||||
key_type (bool): False if our value is a value in a dict
|
|
||||||
True if it is a key in a dict
|
|
||||||
False if our item is an item in a list
|
|
||||||
None if unset
|
|
||||||
"""
|
|
||||||
self.path_to_item = path_to_item
|
|
||||||
self.valid_classes = valid_classes
|
|
||||||
self.key_type = key_type
|
|
||||||
full_msg = msg
|
|
||||||
if path_to_item:
|
|
||||||
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
||||||
super(ApiTypeError, self).__init__(full_msg)
|
|
||||||
|
|
||||||
|
|
||||||
class ApiValueError(OpenApiException, ValueError):
|
|
||||||
def __init__(self, msg, path_to_item=None):
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
msg (str): the exception message
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
path_to_item (list) the path to the exception in the
|
|
||||||
received_data dict. None if unset
|
|
||||||
"""
|
|
||||||
|
|
||||||
self.path_to_item = path_to_item
|
|
||||||
full_msg = msg
|
|
||||||
if path_to_item:
|
|
||||||
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
||||||
super(ApiValueError, self).__init__(full_msg)
|
|
||||||
|
|
||||||
|
|
||||||
class ApiAttributeError(OpenApiException, AttributeError):
|
|
||||||
def __init__(self, msg, path_to_item=None):
|
|
||||||
"""
|
|
||||||
Raised when an attribute reference or assignment fails.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
msg (str): the exception message
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
path_to_item (None/list) the path to the exception in the
|
|
||||||
received_data dict
|
|
||||||
"""
|
|
||||||
self.path_to_item = path_to_item
|
|
||||||
full_msg = msg
|
|
||||||
if path_to_item:
|
|
||||||
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
||||||
super(ApiAttributeError, self).__init__(full_msg)
|
|
||||||
|
|
||||||
|
|
||||||
class ApiKeyError(OpenApiException, KeyError):
|
|
||||||
def __init__(self, msg, path_to_item=None):
|
|
||||||
"""
|
|
||||||
Args:
|
|
||||||
msg (str): the exception message
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
path_to_item (None/list) the path to the exception in the
|
|
||||||
received_data dict
|
|
||||||
"""
|
|
||||||
self.path_to_item = path_to_item
|
|
||||||
full_msg = msg
|
|
||||||
if path_to_item:
|
|
||||||
full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
|
|
||||||
super(ApiKeyError, self).__init__(full_msg)
|
|
||||||
|
|
||||||
|
|
||||||
class ApiException(OpenApiException):
|
|
||||||
|
|
||||||
def __init__(self, status=None, reason=None, http_resp=None):
|
|
||||||
if http_resp:
|
|
||||||
self.status = http_resp.status
|
|
||||||
self.reason = http_resp.reason
|
|
||||||
self.body = http_resp.data
|
|
||||||
self.headers = http_resp.getheaders()
|
|
||||||
else:
|
|
||||||
self.status = status
|
|
||||||
self.reason = reason
|
|
||||||
self.body = None
|
|
||||||
self.headers = None
|
|
||||||
|
|
||||||
def __str__(self):
|
|
||||||
"""Custom error messages for exception"""
|
|
||||||
error_message = "({0})\n"\
|
|
||||||
"Reason: {1}\n".format(self.status, self.reason)
|
|
||||||
if self.headers:
|
|
||||||
error_message += "HTTP response headers: {0}\n".format(
|
|
||||||
self.headers)
|
|
||||||
|
|
||||||
if self.body:
|
|
||||||
error_message += "HTTP response body: {0}\n".format(self.body)
|
|
||||||
|
|
||||||
return error_message
|
|
||||||
|
|
||||||
|
|
||||||
def render_path(path_to_item):
|
|
||||||
"""Returns a string representation of a path"""
|
|
||||||
result = ""
|
|
||||||
for pth in path_to_item:
|
|
||||||
if isinstance(pth, int):
|
|
||||||
result += "[{0}]".format(pth)
|
|
||||||
else:
|
|
||||||
result += "['{0}']".format(pth)
|
|
||||||
return result
|
|
|
@ -1,174 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class CollectionDescription(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
return {
|
|
||||||
'name': (str,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'name': 'name', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, name, *args, **kwargs): # noqa: E501
|
|
||||||
"""CollectionDescription - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
name (str):
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.name = name
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,202 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class CollectionInfo(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
('disk_data_size',): {
|
|
||||||
'inclusive_minimum': 0,
|
|
||||||
},
|
|
||||||
('ram_data_size',): {
|
|
||||||
'inclusive_minimum': 0,
|
|
||||||
},
|
|
||||||
('segments_count',): {
|
|
||||||
'inclusive_minimum': 0,
|
|
||||||
},
|
|
||||||
('vectors_count',): {
|
|
||||||
'inclusive_minimum': 0,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
return {
|
|
||||||
'config': (object,), # noqa: E501
|
|
||||||
'disk_data_size': (int,), # noqa: E501
|
|
||||||
'ram_data_size': (int,), # noqa: E501
|
|
||||||
'segments_count': (int,), # noqa: E501
|
|
||||||
'vectors_count': (int,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'config': 'config', # noqa: E501
|
|
||||||
'disk_data_size': 'disk_data_size', # noqa: E501
|
|
||||||
'ram_data_size': 'ram_data_size', # noqa: E501
|
|
||||||
'segments_count': 'segments_count', # noqa: E501
|
|
||||||
'vectors_count': 'vectors_count', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, config, disk_data_size, ram_data_size, segments_count, vectors_count, *args, **kwargs): # noqa: E501
|
|
||||||
"""CollectionInfo - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
config (object): Collection settings
|
|
||||||
disk_data_size (int): Disk space, used by collection
|
|
||||||
ram_data_size (int): RAM used by collection
|
|
||||||
segments_count (int): Number of segments in collection
|
|
||||||
vectors_count (int): Number of vectors in collection
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.config = config
|
|
||||||
self.disk_data_size = disk_data_size
|
|
||||||
self.ram_data_size = ram_data_size
|
|
||||||
self.segments_count = segments_count
|
|
||||||
self.vectors_count = vectors_count
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,267 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.payload_ops import PayloadOps
|
|
||||||
from openapi_client.model.payload_ops_any_of1_delete_payload import PayloadOpsAnyOf1DeletePayload
|
|
||||||
from openapi_client.model.payload_ops_any_of2_clear_payload import PayloadOpsAnyOf2ClearPayload
|
|
||||||
from openapi_client.model.payload_ops_any_of_set_payload import PayloadOpsAnyOfSetPayload
|
|
||||||
from openapi_client.model.point_insert_ops import PointInsertOps
|
|
||||||
from openapi_client.model.point_ops import PointOps
|
|
||||||
from openapi_client.model.point_ops_any_of1_delete_points import PointOpsAnyOf1DeletePoints
|
|
||||||
globals()['PayloadOps'] = PayloadOps
|
|
||||||
globals()['PayloadOpsAnyOf1DeletePayload'] = PayloadOpsAnyOf1DeletePayload
|
|
||||||
globals()['PayloadOpsAnyOf2ClearPayload'] = PayloadOpsAnyOf2ClearPayload
|
|
||||||
globals()['PayloadOpsAnyOfSetPayload'] = PayloadOpsAnyOfSetPayload
|
|
||||||
globals()['PointInsertOps'] = PointInsertOps
|
|
||||||
globals()['PointOps'] = PointOps
|
|
||||||
globals()['PointOpsAnyOf1DeletePoints'] = PointOpsAnyOf1DeletePoints
|
|
||||||
|
|
||||||
|
|
||||||
class CollectionUpdateOperations(ModelComposed):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def additional_properties_type():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'upsert_points': (PointInsertOps,), # noqa: E501
|
|
||||||
'delete_points': (PointOpsAnyOf1DeletePoints,), # noqa: E501
|
|
||||||
'set_payload': (PayloadOpsAnyOfSetPayload,), # noqa: E501
|
|
||||||
'delete_payload': (PayloadOpsAnyOf1DeletePayload,), # noqa: E501
|
|
||||||
'clear_payload': (PayloadOpsAnyOf2ClearPayload,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'upsert_points': 'upsert_points', # noqa: E501
|
|
||||||
'delete_points': 'delete_points', # noqa: E501
|
|
||||||
'set_payload': 'set_payload', # noqa: E501
|
|
||||||
'delete_payload': 'delete_payload', # noqa: E501
|
|
||||||
'clear_payload': 'clear_payload', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
'_composed_instances',
|
|
||||||
'_var_name_to_model_instances',
|
|
||||||
'_additional_properties_model_instances',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, *args, **kwargs): # noqa: E501
|
|
||||||
"""CollectionUpdateOperations - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
upsert_points (PointInsertOps): defaults to nulltype.Null # noqa: E501
|
|
||||||
delete_points (PointOpsAnyOf1DeletePoints): defaults to nulltype.Null # noqa: E501
|
|
||||||
set_payload (PayloadOpsAnyOfSetPayload): defaults to nulltype.Null # noqa: E501
|
|
||||||
delete_payload (PayloadOpsAnyOf1DeletePayload): defaults to nulltype.Null # noqa: E501
|
|
||||||
clear_payload (PayloadOpsAnyOf2ClearPayload): defaults to nulltype.Null # noqa: E501
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
upsert_points = kwargs.get('upsert_points', nulltype.Null)
|
|
||||||
delete_points = kwargs.get('delete_points', nulltype.Null)
|
|
||||||
set_payload = kwargs.get('set_payload', nulltype.Null)
|
|
||||||
delete_payload = kwargs.get('delete_payload', nulltype.Null)
|
|
||||||
clear_payload = kwargs.get('clear_payload', nulltype.Null)
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
constant_args = {
|
|
||||||
'_check_type': _check_type,
|
|
||||||
'_path_to_item': _path_to_item,
|
|
||||||
'_spec_property_naming': _spec_property_naming,
|
|
||||||
'_configuration': _configuration,
|
|
||||||
'_visited_composed_classes': self._visited_composed_classes,
|
|
||||||
}
|
|
||||||
required_args = {
|
|
||||||
'upsert_points': upsert_points,
|
|
||||||
'delete_points': delete_points,
|
|
||||||
'set_payload': set_payload,
|
|
||||||
'delete_payload': delete_payload,
|
|
||||||
'clear_payload': clear_payload,
|
|
||||||
}
|
|
||||||
# remove args whose value is Null because they are unset
|
|
||||||
required_arg_names = list(required_args.keys())
|
|
||||||
for required_arg_name in required_arg_names:
|
|
||||||
if required_args[required_arg_name] is nulltype.Null:
|
|
||||||
del required_args[required_arg_name]
|
|
||||||
model_args = {}
|
|
||||||
model_args.update(required_args)
|
|
||||||
model_args.update(kwargs)
|
|
||||||
composed_info = validate_get_composed_info(
|
|
||||||
constant_args, model_args, self)
|
|
||||||
self._composed_instances = composed_info[0]
|
|
||||||
self._var_name_to_model_instances = composed_info[1]
|
|
||||||
self._additional_properties_model_instances = composed_info[2]
|
|
||||||
unused_args = composed_info[3]
|
|
||||||
|
|
||||||
for var_name, var_value in required_args.items():
|
|
||||||
setattr(self, var_name, var_value)
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name in unused_args and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
not self._additional_properties_model_instances:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def _composed_schemas():
|
|
||||||
# we need this here to make our import statements work
|
|
||||||
# we must store _composed_schemas in here so the code is only run
|
|
||||||
# when we invoke this method. If we kept this at the class
|
|
||||||
# level we would get an error beause the class level
|
|
||||||
# code would be run when this module is imported, and these composed
|
|
||||||
# classes don't exist yet because their module has not finished
|
|
||||||
# loading
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'anyOf': [
|
|
||||||
PayloadOps,
|
|
||||||
PointOps,
|
|
||||||
],
|
|
||||||
'allOf': [
|
|
||||||
],
|
|
||||||
'oneOf': [
|
|
||||||
],
|
|
||||||
}
|
|
|
@ -1,179 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.collection_description import CollectionDescription
|
|
||||||
globals()['CollectionDescription'] = CollectionDescription
|
|
||||||
|
|
||||||
|
|
||||||
class CollectionsResponse(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'collections': ([CollectionDescription],), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'collections': 'collections', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, collections, *args, **kwargs): # noqa: E501
|
|
||||||
"""CollectionsResponse - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
collections ([CollectionDescription]):
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.collections = collections
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,274 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.condition_any_of import ConditionAnyOf
|
|
||||||
from openapi_client.model.condition_any_of1 import ConditionAnyOf1
|
|
||||||
from openapi_client.model.condition_any_of2 import ConditionAnyOf2
|
|
||||||
from openapi_client.model.condition_any_of3 import ConditionAnyOf3
|
|
||||||
from openapi_client.model.condition_any_of4 import ConditionAnyOf4
|
|
||||||
from openapi_client.model.filter import Filter
|
|
||||||
from openapi_client.model.geo_bounding_box import GeoBoundingBox
|
|
||||||
from openapi_client.model.match import Match
|
|
||||||
from openapi_client.model.range import Range
|
|
||||||
globals()['ConditionAnyOf'] = ConditionAnyOf
|
|
||||||
globals()['ConditionAnyOf1'] = ConditionAnyOf1
|
|
||||||
globals()['ConditionAnyOf2'] = ConditionAnyOf2
|
|
||||||
globals()['ConditionAnyOf3'] = ConditionAnyOf3
|
|
||||||
globals()['ConditionAnyOf4'] = ConditionAnyOf4
|
|
||||||
globals()['Filter'] = Filter
|
|
||||||
globals()['GeoBoundingBox'] = GeoBoundingBox
|
|
||||||
globals()['Match'] = Match
|
|
||||||
globals()['Range'] = Range
|
|
||||||
|
|
||||||
|
|
||||||
class Condition(ModelComposed):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def additional_properties_type():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'filter': (Filter,), # noqa: E501
|
|
||||||
'match': (Match,), # noqa: E501
|
|
||||||
'range': (Range,), # noqa: E501
|
|
||||||
'geo_bounding_box': (GeoBoundingBox,), # noqa: E501
|
|
||||||
'has_id': ([int],), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'filter': 'filter', # noqa: E501
|
|
||||||
'match': 'match', # noqa: E501
|
|
||||||
'range': 'range', # noqa: E501
|
|
||||||
'geo_bounding_box': 'geo_bounding_box', # noqa: E501
|
|
||||||
'has_id': 'has_id', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
'_composed_instances',
|
|
||||||
'_var_name_to_model_instances',
|
|
||||||
'_additional_properties_model_instances',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, *args, **kwargs): # noqa: E501
|
|
||||||
"""Condition - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
filter (Filter): defaults to nulltype.Null # noqa: E501
|
|
||||||
match (Match): defaults to nulltype.Null # noqa: E501
|
|
||||||
range (Range): defaults to nulltype.Null # noqa: E501
|
|
||||||
geo_bounding_box (GeoBoundingBox): defaults to nulltype.Null # noqa: E501
|
|
||||||
has_id ([int]): defaults to nulltype.Null # noqa: E501
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
filter = kwargs.get('filter', nulltype.Null)
|
|
||||||
match = kwargs.get('match', nulltype.Null)
|
|
||||||
range = kwargs.get('range', nulltype.Null)
|
|
||||||
geo_bounding_box = kwargs.get('geo_bounding_box', nulltype.Null)
|
|
||||||
has_id = kwargs.get('has_id', nulltype.Null)
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
constant_args = {
|
|
||||||
'_check_type': _check_type,
|
|
||||||
'_path_to_item': _path_to_item,
|
|
||||||
'_spec_property_naming': _spec_property_naming,
|
|
||||||
'_configuration': _configuration,
|
|
||||||
'_visited_composed_classes': self._visited_composed_classes,
|
|
||||||
}
|
|
||||||
required_args = {
|
|
||||||
'filter': filter,
|
|
||||||
'match': match,
|
|
||||||
'range': range,
|
|
||||||
'geo_bounding_box': geo_bounding_box,
|
|
||||||
'has_id': has_id,
|
|
||||||
}
|
|
||||||
# remove args whose value is Null because they are unset
|
|
||||||
required_arg_names = list(required_args.keys())
|
|
||||||
for required_arg_name in required_arg_names:
|
|
||||||
if required_args[required_arg_name] is nulltype.Null:
|
|
||||||
del required_args[required_arg_name]
|
|
||||||
model_args = {}
|
|
||||||
model_args.update(required_args)
|
|
||||||
model_args.update(kwargs)
|
|
||||||
composed_info = validate_get_composed_info(
|
|
||||||
constant_args, model_args, self)
|
|
||||||
self._composed_instances = composed_info[0]
|
|
||||||
self._var_name_to_model_instances = composed_info[1]
|
|
||||||
self._additional_properties_model_instances = composed_info[2]
|
|
||||||
unused_args = composed_info[3]
|
|
||||||
|
|
||||||
for var_name, var_value in required_args.items():
|
|
||||||
setattr(self, var_name, var_value)
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name in unused_args and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
not self._additional_properties_model_instances:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def _composed_schemas():
|
|
||||||
# we need this here to make our import statements work
|
|
||||||
# we must store _composed_schemas in here so the code is only run
|
|
||||||
# when we invoke this method. If we kept this at the class
|
|
||||||
# level we would get an error beause the class level
|
|
||||||
# code would be run when this module is imported, and these composed
|
|
||||||
# classes don't exist yet because their module has not finished
|
|
||||||
# loading
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'anyOf': [
|
|
||||||
ConditionAnyOf,
|
|
||||||
ConditionAnyOf1,
|
|
||||||
ConditionAnyOf2,
|
|
||||||
ConditionAnyOf3,
|
|
||||||
ConditionAnyOf4,
|
|
||||||
],
|
|
||||||
'allOf': [
|
|
||||||
],
|
|
||||||
'oneOf': [
|
|
||||||
],
|
|
||||||
}
|
|
|
@ -1,179 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.filter import Filter
|
|
||||||
globals()['Filter'] = Filter
|
|
||||||
|
|
||||||
|
|
||||||
class ConditionAnyOf(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'filter': (Filter,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'filter': 'filter', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, filter, *args, **kwargs): # noqa: E501
|
|
||||||
"""ConditionAnyOf - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
filter (Filter):
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.filter = filter
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,179 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.match import Match
|
|
||||||
globals()['Match'] = Match
|
|
||||||
|
|
||||||
|
|
||||||
class ConditionAnyOf1(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'match': (Match,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'match': 'match', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, match, *args, **kwargs): # noqa: E501
|
|
||||||
"""ConditionAnyOf1 - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
match (Match):
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.match = match
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,179 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.range import Range
|
|
||||||
globals()['Range'] = Range
|
|
||||||
|
|
||||||
|
|
||||||
class ConditionAnyOf2(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'range': (Range,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'range': 'range', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, range, *args, **kwargs): # noqa: E501
|
|
||||||
"""ConditionAnyOf2 - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
range (Range):
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.range = range
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,179 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.geo_bounding_box import GeoBoundingBox
|
|
||||||
globals()['GeoBoundingBox'] = GeoBoundingBox
|
|
||||||
|
|
||||||
|
|
||||||
class ConditionAnyOf3(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'geo_bounding_box': (GeoBoundingBox,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'geo_bounding_box': 'geo_bounding_box', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, geo_bounding_box, *args, **kwargs): # noqa: E501
|
|
||||||
"""ConditionAnyOf3 - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
geo_bounding_box (GeoBoundingBox):
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.geo_bounding_box = geo_bounding_box
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,174 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ConditionAnyOf4(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
return {
|
|
||||||
'has_id': ([int],), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'has_id': 'has_id', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, has_id, *args, **kwargs): # noqa: E501
|
|
||||||
"""ConditionAnyOf4 - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
has_id ([int]):
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.has_id = has_id
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,188 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class Distance(ModelSimple):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
('value',): {
|
|
||||||
'COSINE': "Cosine",
|
|
||||||
'EUCLID': "Euclid",
|
|
||||||
'DOT': "Dot",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
return {
|
|
||||||
'value': (str,),
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {}
|
|
||||||
|
|
||||||
_composed_schemas = None
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
"""Distance - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Note that value can be passed either in args or in kwargs, but not in both.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
args[0] (str): Type of internal tags, build from payload Distance function types used to compare vectors., must be one of ["Cosine", "Euclid", "Dot", ] # noqa: E501
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
value (str): Type of internal tags, build from payload Distance function types used to compare vectors., must be one of ["Cosine", "Euclid", "Dot", ] # noqa: E501
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
if 'value' in kwargs:
|
|
||||||
value = kwargs.pop('value')
|
|
||||||
elif args:
|
|
||||||
args = list(args)
|
|
||||||
value = args.pop(0)
|
|
||||||
else:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"value is required, but not passed in args or kwargs and doesn't have default",
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
self.value = value
|
|
||||||
if kwargs:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
|
|
||||||
kwargs,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
|
@ -1,182 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.error_response_status import ErrorResponseStatus
|
|
||||||
globals()['ErrorResponseStatus'] = ErrorResponseStatus
|
|
||||||
|
|
||||||
|
|
||||||
class ErrorResponse(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'time': (float,), # noqa: E501
|
|
||||||
'status': (ErrorResponseStatus,), # noqa: E501
|
|
||||||
'result': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'time': 'time', # noqa: E501
|
|
||||||
'status': 'status', # noqa: E501
|
|
||||||
'result': 'result', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, *args, **kwargs): # noqa: E501
|
|
||||||
"""ErrorResponse - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
time (float): Time spent to process this request. [optional] # noqa: E501
|
|
||||||
status (ErrorResponseStatus): [optional] # noqa: E501
|
|
||||||
result ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,171 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ErrorResponseStatus(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
return {
|
|
||||||
'error': (str,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'error': 'error', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, *args, **kwargs): # noqa: E501
|
|
||||||
"""ErrorResponseStatus - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
error (str): Description of the occurred error.. [optional] # noqa: E501
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,182 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.condition import Condition
|
|
||||||
globals()['Condition'] = Condition
|
|
||||||
|
|
||||||
|
|
||||||
class Filter(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'must': ([Condition], none_type,), # noqa: E501
|
|
||||||
'must_not': ([Condition], none_type,), # noqa: E501
|
|
||||||
'should': ([Condition], none_type,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'must': 'must', # noqa: E501
|
|
||||||
'must_not': 'must_not', # noqa: E501
|
|
||||||
'should': 'should', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, *args, **kwargs): # noqa: E501
|
|
||||||
"""Filter - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
must ([Condition], none_type): All conditions must match. [optional] # noqa: E501
|
|
||||||
must_not ([Condition], none_type): All conditions must NOT match. [optional] # noqa: E501
|
|
||||||
should ([Condition], none_type): At least one of thous conditions should match. [optional] # noqa: E501
|
|
||||||
"""
|
|
||||||
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
|
@ -1,247 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
def lazy_import():
|
|
||||||
from openapi_client.model.indexes_any_of import IndexesAnyOf
|
|
||||||
from openapi_client.model.indexes_any_of1 import IndexesAnyOf1
|
|
||||||
from openapi_client.model.indexes_any_of1_options import IndexesAnyOf1Options
|
|
||||||
globals()['IndexesAnyOf'] = IndexesAnyOf
|
|
||||||
globals()['IndexesAnyOf1'] = IndexesAnyOf1
|
|
||||||
globals()['IndexesAnyOf1Options'] = IndexesAnyOf1Options
|
|
||||||
|
|
||||||
|
|
||||||
class Indexes(ModelComposed):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
('type',): {
|
|
||||||
'HNSW': "hnsw",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def additional_properties_type():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'options': (IndexesAnyOf1Options,), # noqa: E501
|
|
||||||
'type': (str,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'options': 'options', # noqa: E501
|
|
||||||
'type': 'type', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
'_composed_instances',
|
|
||||||
'_var_name_to_model_instances',
|
|
||||||
'_additional_properties_model_instances',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, *args, **kwargs): # noqa: E501
|
|
||||||
"""Indexes - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
options (IndexesAnyOf1Options): defaults to nulltype.Null # noqa: E501
|
|
||||||
type (str): defaults to nulltype.Null, must be one of ["hnsw", ] # noqa: E501
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
options = kwargs.get('options', nulltype.Null)
|
|
||||||
type = kwargs.get('type', nulltype.Null)
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
constant_args = {
|
|
||||||
'_check_type': _check_type,
|
|
||||||
'_path_to_item': _path_to_item,
|
|
||||||
'_spec_property_naming': _spec_property_naming,
|
|
||||||
'_configuration': _configuration,
|
|
||||||
'_visited_composed_classes': self._visited_composed_classes,
|
|
||||||
}
|
|
||||||
required_args = {
|
|
||||||
'options': options,
|
|
||||||
'type': type,
|
|
||||||
}
|
|
||||||
# remove args whose value is Null because they are unset
|
|
||||||
required_arg_names = list(required_args.keys())
|
|
||||||
for required_arg_name in required_arg_names:
|
|
||||||
if required_args[required_arg_name] is nulltype.Null:
|
|
||||||
del required_args[required_arg_name]
|
|
||||||
model_args = {}
|
|
||||||
model_args.update(required_args)
|
|
||||||
model_args.update(kwargs)
|
|
||||||
composed_info = validate_get_composed_info(
|
|
||||||
constant_args, model_args, self)
|
|
||||||
self._composed_instances = composed_info[0]
|
|
||||||
self._var_name_to_model_instances = composed_info[1]
|
|
||||||
self._additional_properties_model_instances = composed_info[2]
|
|
||||||
unused_args = composed_info[3]
|
|
||||||
|
|
||||||
for var_name, var_value in required_args.items():
|
|
||||||
setattr(self, var_name, var_value)
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name in unused_args and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
not self._additional_properties_model_instances:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def _composed_schemas():
|
|
||||||
# we need this here to make our import statements work
|
|
||||||
# we must store _composed_schemas in here so the code is only run
|
|
||||||
# when we invoke this method. If we kept this at the class
|
|
||||||
# level we would get an error beause the class level
|
|
||||||
# code would be run when this module is imported, and these composed
|
|
||||||
# classes don't exist yet because their module has not finished
|
|
||||||
# loading
|
|
||||||
lazy_import()
|
|
||||||
return {
|
|
||||||
'anyOf': [
|
|
||||||
IndexesAnyOf,
|
|
||||||
IndexesAnyOf1,
|
|
||||||
],
|
|
||||||
'allOf': [
|
|
||||||
],
|
|
||||||
'oneOf': [
|
|
||||||
],
|
|
||||||
}
|
|
|
@ -1,182 +0,0 @@
|
||||||
# coding: utf-8
|
|
||||||
|
|
||||||
"""
|
|
||||||
Qdrant API
|
|
||||||
|
|
||||||
API description for Qdrant vector search engine. Describes CRUD and search operations on collections of points (vectors with payload). # noqa: E501
|
|
||||||
|
|
||||||
The version of the OpenAPI document: 0.1.0
|
|
||||||
Contact: andrey@vasnetsov.com
|
|
||||||
Generated by: https://openapi-generator.tech
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
import re # noqa: F401
|
|
||||||
import sys # noqa: F401
|
|
||||||
|
|
||||||
import nulltype # noqa: F401
|
|
||||||
|
|
||||||
from openapi_client.model_utils import ( # noqa: F401
|
|
||||||
ApiTypeError,
|
|
||||||
ModelComposed,
|
|
||||||
ModelNormal,
|
|
||||||
ModelSimple,
|
|
||||||
cached_property,
|
|
||||||
change_keys_js_to_python,
|
|
||||||
convert_js_args_to_python_args,
|
|
||||||
date,
|
|
||||||
datetime,
|
|
||||||
file_type,
|
|
||||||
none_type,
|
|
||||||
validate_get_composed_info,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class IndexesAnyOf(ModelNormal):
|
|
||||||
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
||||||
Ref: https://openapi-generator.tech
|
|
||||||
|
|
||||||
Do not edit the class manually.
|
|
||||||
|
|
||||||
Attributes:
|
|
||||||
allowed_values (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
with a capitalized key describing the allowed value and an allowed
|
|
||||||
value. These dicts store the allowed enum values.
|
|
||||||
attribute_map (dict): The key is attribute name
|
|
||||||
and the value is json key in definition.
|
|
||||||
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
||||||
variable value to the discriminator class name.
|
|
||||||
validations (dict): The key is the tuple path to the attribute
|
|
||||||
and the for var_name this is (var_name,). The value is a dict
|
|
||||||
that stores validations for max_length, min_length, max_items,
|
|
||||||
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
||||||
inclusive_minimum, and regex.
|
|
||||||
additional_properties_type (tuple): A tuple of classes accepted
|
|
||||||
as additional properties values.
|
|
||||||
"""
|
|
||||||
|
|
||||||
allowed_values = {
|
|
||||||
('type',): {
|
|
||||||
'PLAIN': "plain",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
validations = {
|
|
||||||
}
|
|
||||||
|
|
||||||
additional_properties_type = None
|
|
||||||
|
|
||||||
_nullable = False
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def openapi_types():
|
|
||||||
"""
|
|
||||||
This must be a method because a model may have properties that are
|
|
||||||
of type self, this must run after the class is loaded
|
|
||||||
|
|
||||||
Returns
|
|
||||||
openapi_types (dict): The key is attribute name
|
|
||||||
and the value is attribute type.
|
|
||||||
"""
|
|
||||||
return {
|
|
||||||
'options': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
|
|
||||||
'type': (str,), # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
@cached_property
|
|
||||||
def discriminator():
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
attribute_map = {
|
|
||||||
'options': 'options', # noqa: E501
|
|
||||||
'type': 'type', # noqa: E501
|
|
||||||
}
|
|
||||||
|
|
||||||
_composed_schemas = {}
|
|
||||||
|
|
||||||
required_properties = set([
|
|
||||||
'_data_store',
|
|
||||||
'_check_type',
|
|
||||||
'_spec_property_naming',
|
|
||||||
'_path_to_item',
|
|
||||||
'_configuration',
|
|
||||||
'_visited_composed_classes',
|
|
||||||
])
|
|
||||||
|
|
||||||
@convert_js_args_to_python_args
|
|
||||||
def __init__(self, options, *args, **kwargs): # noqa: E501
|
|
||||||
"""IndexesAnyOf - a model defined in OpenAPI
|
|
||||||
|
|
||||||
Args:
|
|
||||||
options ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}):
|
|
||||||
|
|
||||||
Keyword Args:
|
|
||||||
type (str): defaults to "plain", must be one of ["plain", ] # noqa: E501
|
|
||||||
_check_type (bool): if True, values for parameters in openapi_types
|
|
||||||
will be type checked and a TypeError will be
|
|
||||||
raised if the wrong type is input.
|
|
||||||
Defaults to True
|
|
||||||
_path_to_item (tuple/list): This is a list of keys or values to
|
|
||||||
drill down to the model in received_data
|
|
||||||
when deserializing a response
|
|
||||||
_spec_property_naming (bool): True if the variable names in the input data
|
|
||||||
are serialized names, as specified in the OpenAPI document.
|
|
||||||
False if the variable names in the input data
|
|
||||||
are pythonic names, e.g. snake case (default)
|
|
||||||
_configuration (Configuration): the instance to use when
|
|
||||||
deserializing a file_type parameter.
|
|
||||||
If passed, type conversion is attempted
|
|
||||||
If omitted no type conversion is done.
|
|
||||||
_visited_composed_classes (tuple): This stores a tuple of
|
|
||||||
classes that we have traveled through so that
|
|
||||||
if we see that class again we will not use its
|
|
||||||
discriminator again.
|
|
||||||
When traveling through a discriminator, the
|
|
||||||
composed schema that is
|
|
||||||
is traveled through is added to this set.
|
|
||||||
For example if Animal has a discriminator
|
|
||||||
petType and we pass in "Dog", and the class Dog
|
|
||||||
allOf includes Animal, we move through Animal
|
|
||||||
once using the discriminator, and pick Dog.
|
|
||||||
Then in Dog, we will make an instance of the
|
|
||||||
Animal class but this time we won't travel
|
|
||||||
through its discriminator because we passed in
|
|
||||||
_visited_composed_classes = (Animal,)
|
|
||||||
"""
|
|
||||||
|
|
||||||
type = kwargs.get('type', "plain")
|
|
||||||
_check_type = kwargs.pop('_check_type', True)
|
|
||||||
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
||||||
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
||||||
_configuration = kwargs.pop('_configuration', None)
|
|
||||||
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
||||||
|
|
||||||
if args:
|
|
||||||
raise ApiTypeError(
|
|
||||||
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
||||||
args,
|
|
||||||
self.__class__.__name__,
|
|
||||||
),
|
|
||||||
path_to_item=_path_to_item,
|
|
||||||
valid_classes=(self.__class__,),
|
|
||||||
)
|
|
||||||
|
|
||||||
self._data_store = {}
|
|
||||||
self._check_type = _check_type
|
|
||||||
self._spec_property_naming = _spec_property_naming
|
|
||||||
self._path_to_item = _path_to_item
|
|
||||||
self._configuration = _configuration
|
|
||||||
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
||||||
|
|
||||||
self.options = options
|
|
||||||
self.type = type
|
|
||||||
for var_name, var_value in kwargs.items():
|
|
||||||
if var_name not in self.attribute_map and \
|
|
||||||
self._configuration is not None and \
|
|
||||||
self._configuration.discard_unknown_keys and \
|
|
||||||
self.additional_properties_type is None:
|
|
||||||
# discard variable.
|
|
||||||
continue
|
|
||||||
setattr(self, var_name, var_value)
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue