manticoresearch-asyncio 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- manticoresearch-asyncio-1.0.0/LICENSE.txt +21 -0
- manticoresearch-asyncio-1.0.0/PKG-INFO +14 -0
- manticoresearch-asyncio-1.0.0/README.md +95 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/__init__.py +77 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/api/__init__.py +7 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/api/index_api.py +1702 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/api/search_api.py +870 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/api/utils_api.py +328 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/api_client.py +792 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/api_response.py +21 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/configuration.py +447 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/exceptions.py +200 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/__init__.py +58 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/agg_composite.py +97 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/agg_composite_source.py +92 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/agg_composite_term.py +88 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/agg_terms.py +90 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/aggregation.py +100 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/autocomplete_request.py +92 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/bool_filter.py +116 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/bulk_response.py +96 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/delete_document_request.py +94 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/delete_response.py +96 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/error_response.py +94 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/fulltext_filter.py +94 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/geo_distance.py +146 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/geo_distance_location_anchor.py +100 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/highlight.py +211 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/highlight_field_option.py +96 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/hits_hits.py +102 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/insert_document_request.py +94 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/join.py +113 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/join_cond.py +97 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/join_on.py +109 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/knn_query.py +102 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/match.py +102 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/match_all.py +95 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/percolate_request.py +92 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/percolate_request_query.py +88 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/query_filter.py +140 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/range.py +114 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/replace_document_request.py +88 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/response_error.py +141 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/response_error_details.py +102 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/search_query.py +153 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/search_request.py +154 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/search_response.py +104 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/search_response_hits.py +102 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/source_rules.py +113 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/sql_obj_response.py +88 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/sql_response.py +141 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/success_response.py +98 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/update_document_request.py +105 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/models/update_response.py +94 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/py.typed +0 -0
- manticoresearch-asyncio-1.0.0/manticoresearch/rest.py +216 -0
- manticoresearch-asyncio-1.0.0/manticoresearch_asyncio.egg-info/PKG-INFO +14 -0
- manticoresearch-asyncio-1.0.0/manticoresearch_asyncio.egg-info/SOURCES.txt +64 -0
- manticoresearch-asyncio-1.0.0/manticoresearch_asyncio.egg-info/dependency_links.txt +1 -0
- manticoresearch-asyncio-1.0.0/manticoresearch_asyncio.egg-info/requires.txt +6 -0
- manticoresearch-asyncio-1.0.0/manticoresearch_asyncio.egg-info/top_level.txt +1 -0
- manticoresearch-asyncio-1.0.0/pyproject.toml +73 -0
- manticoresearch-asyncio-1.0.0/setup.cfg +7 -0
- manticoresearch-asyncio-1.0.0/setup.py +53 -0
- manticoresearch-asyncio-1.0.0/test/test_manual.py +79 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020-2025, Manticore Software LTD
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: manticoresearch-asyncio
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Manticore Search Client
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Manticore Software Ltd.
|
|
7
|
+
Author-email: info@manticoresearch.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Keywords: OpenAPI,OpenAPI-Generator,Manticore Search Client
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
License-File: LICENSE.txt
|
|
12
|
+
|
|
13
|
+
Сlient for Manticore Search.
|
|
14
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Manticore Python client
|
|
2
|
+
|
|
3
|
+
Сlient for Manticore Search.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
To run the server, please execute the following from the root directory:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
pip3 install -r requirements.txt
|
|
11
|
+
python3 -m manticoresearch
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
and open your browser to here:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
http://localhost:/ui/
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Your OpenAPI definition lives here:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
http://localhost:/openapi.json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To launch the integration tests, use pytest:
|
|
27
|
+
```
|
|
28
|
+
sudo pip install -r test-requirements.txt
|
|
29
|
+
pytest
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Prevent file overriding
|
|
33
|
+
|
|
34
|
+
After first generation, add edited files to _.openapi-generator-ignore_ to prevent generator from overwriting them. Typically:
|
|
35
|
+
```
|
|
36
|
+
server/controllers/*
|
|
37
|
+
test/*
|
|
38
|
+
*.txt
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Getting Started
|
|
42
|
+
|
|
43
|
+
Please follow the installation procedure and then run the following example:
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
import manticoresearch
|
|
47
|
+
from manticoresearch.rest import ApiException
|
|
48
|
+
from pprint import pprint
|
|
49
|
+
|
|
50
|
+
# Defining the host is optional and defaults to http://127.0.0.1:9308
|
|
51
|
+
# See configuration.py for a list of all supported configuration parameters.
|
|
52
|
+
configuration = manticoresearch.Configuration(
|
|
53
|
+
host = "http://127.0.0.1:9308"
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Enter a context with an instance of the API client
|
|
58
|
+
async with manticoresearch.ApiClient(configuration) as api_client:
|
|
59
|
+
# Create instances of API classes
|
|
60
|
+
indexApi = manticoresearch.IndexApi(api_client)
|
|
61
|
+
searchApi = manticoresearch.SearchApi(api_client)
|
|
62
|
+
utilsApi = manticoresearch.UtilsApi(api_client)
|
|
63
|
+
|
|
64
|
+
try:
|
|
65
|
+
# Perform insert and search operations
|
|
66
|
+
newDoc = {"title" : "Crossbody Bag with Tassel", "price": 19.85}
|
|
67
|
+
insert_request = InsertDocumentRequest(index="products", doc=newDoc)
|
|
68
|
+
await indexApi.insert(insert_request)
|
|
69
|
+
|
|
70
|
+
# Check out the structure of the autocreated 'products' table
|
|
71
|
+
sql_response = await utilsApi.sql('DESC products');
|
|
72
|
+
print("The response of UtilsApi->sql:\n")
|
|
73
|
+
pprint(sql_response)
|
|
74
|
+
|
|
75
|
+
newDoc = {"title" : "Pet Hair Remover Glove", "price": 7.99}
|
|
76
|
+
insert_request = InsertDocumentRequest(index="products", doc=newDoc)
|
|
77
|
+
await indexApi.insert(insert_request)
|
|
78
|
+
|
|
79
|
+
query_highlight = Highlight()
|
|
80
|
+
query_highlight.fields = {"title":{}}
|
|
81
|
+
search_query = SearchQuery(query_string="@title bag")
|
|
82
|
+
search_request = SearchRequest(index="products", query=search_query, highlight=query_highlight)
|
|
83
|
+
search_response = await searchApi.search(search_request)
|
|
84
|
+
print("The response of SearchApi->search:\n")
|
|
85
|
+
pprint(search_response)
|
|
86
|
+
|
|
87
|
+
# Alternatively, you can pass all request arguments as a complex JSON object
|
|
88
|
+
await indexApi.insert({"index": "products", "doc" : {"title" : "Crossbody Bag with Tassel", "price" : 19.85}})
|
|
89
|
+
await indexApi.insert({"index": "products", "doc" : {"title" : "Pet Hair Remover Glove", "price" : 7.99}})
|
|
90
|
+
search_response = await searchApi.search({"index": "products", "query": {"query_string": "@title bag"}, "highlight":{"fields":{"title":{}}}})
|
|
91
|
+
print("The response of SearchApi->search:\n")
|
|
92
|
+
pprint(search_response)
|
|
93
|
+
except ApiException as e:
|
|
94
|
+
print("Exception when calling Api method: %s\n" % e)
|
|
95
|
+
```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
Manticore Search Client
|
|
7
|
+
|
|
8
|
+
Сlient for Manticore Search.
|
|
9
|
+
|
|
10
|
+
The version of the OpenAPI document: 5.0.0
|
|
11
|
+
Contact: info@manticoresearch.com
|
|
12
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
|
+
|
|
14
|
+
Do not edit the class manually.
|
|
15
|
+
""" # noqa: E501
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
__version__ = "8.0.0"
|
|
19
|
+
|
|
20
|
+
# import apis into sdk package
|
|
21
|
+
from manticoresearch.api.index_api import IndexApi
|
|
22
|
+
from manticoresearch.api.search_api import SearchApi
|
|
23
|
+
from manticoresearch.api.utils_api import UtilsApi
|
|
24
|
+
|
|
25
|
+
# import ApiClient
|
|
26
|
+
from manticoresearch.api_response import ApiResponse
|
|
27
|
+
from manticoresearch.api_client import ApiClient
|
|
28
|
+
from manticoresearch.configuration import Configuration
|
|
29
|
+
from manticoresearch.exceptions import OpenApiException
|
|
30
|
+
from manticoresearch.exceptions import ApiTypeError
|
|
31
|
+
from manticoresearch.exceptions import ApiValueError
|
|
32
|
+
from manticoresearch.exceptions import ApiKeyError
|
|
33
|
+
from manticoresearch.exceptions import ApiAttributeError
|
|
34
|
+
from manticoresearch.exceptions import ApiException
|
|
35
|
+
|
|
36
|
+
# import models into sdk package
|
|
37
|
+
from manticoresearch.models.agg_composite import AggComposite
|
|
38
|
+
from manticoresearch.models.agg_composite_source import AggCompositeSource
|
|
39
|
+
from manticoresearch.models.agg_composite_term import AggCompositeTerm
|
|
40
|
+
from manticoresearch.models.agg_terms import AggTerms
|
|
41
|
+
from manticoresearch.models.aggregation import Aggregation
|
|
42
|
+
from manticoresearch.models.autocomplete_request import AutocompleteRequest
|
|
43
|
+
from manticoresearch.models.bool_filter import BoolFilter
|
|
44
|
+
from manticoresearch.models.bulk_response import BulkResponse
|
|
45
|
+
from manticoresearch.models.delete_document_request import DeleteDocumentRequest
|
|
46
|
+
from manticoresearch.models.delete_response import DeleteResponse
|
|
47
|
+
from manticoresearch.models.error_response import ErrorResponse
|
|
48
|
+
from manticoresearch.models.fulltext_filter import FulltextFilter
|
|
49
|
+
from manticoresearch.models.geo_distance import GeoDistance
|
|
50
|
+
from manticoresearch.models.geo_distance_location_anchor import GeoDistanceLocationAnchor
|
|
51
|
+
from manticoresearch.models.highlight import Highlight
|
|
52
|
+
from manticoresearch.models.highlight_field_option import HighlightFieldOption
|
|
53
|
+
from manticoresearch.models.hits_hits import HitsHits
|
|
54
|
+
from manticoresearch.models.insert_document_request import InsertDocumentRequest
|
|
55
|
+
from manticoresearch.models.join import Join
|
|
56
|
+
from manticoresearch.models.join_cond import JoinCond
|
|
57
|
+
from manticoresearch.models.join_on import JoinOn
|
|
58
|
+
from manticoresearch.models.knn_query import KnnQuery
|
|
59
|
+
from manticoresearch.models.match import Match
|
|
60
|
+
from manticoresearch.models.match_all import MatchAll
|
|
61
|
+
from manticoresearch.models.percolate_request import PercolateRequest
|
|
62
|
+
from manticoresearch.models.percolate_request_query import PercolateRequestQuery
|
|
63
|
+
from manticoresearch.models.query_filter import QueryFilter
|
|
64
|
+
from manticoresearch.models.range import Range
|
|
65
|
+
from manticoresearch.models.replace_document_request import ReplaceDocumentRequest
|
|
66
|
+
from manticoresearch.models.response_error import ResponseError
|
|
67
|
+
from manticoresearch.models.response_error_details import ResponseErrorDetails
|
|
68
|
+
from manticoresearch.models.search_query import SearchQuery
|
|
69
|
+
from manticoresearch.models.search_request import SearchRequest
|
|
70
|
+
from manticoresearch.models.search_response import SearchResponse
|
|
71
|
+
from manticoresearch.models.search_response_hits import SearchResponseHits
|
|
72
|
+
from manticoresearch.models.source_rules import SourceRules
|
|
73
|
+
from manticoresearch.models.sql_obj_response import SqlObjResponse
|
|
74
|
+
from manticoresearch.models.sql_response import SqlResponse
|
|
75
|
+
from manticoresearch.models.success_response import SuccessResponse
|
|
76
|
+
from manticoresearch.models.update_document_request import UpdateDocumentRequest
|
|
77
|
+
from manticoresearch.models.update_response import UpdateResponse
|