Package: zincsearch-sdk
zincsearch-sdkZinc Search engine API documentshttps://docs.zincsearch.comThis Python package is automatically generated by theOpenAPI Generatorproject:API version: 0.3.3Package version: 0.3.3Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visithttps://www.zincsearch.comRequirements.Python >=3.6Installation & Usagepip installIf the python package is hosted on a repository, you can install directly using:pipinstallgit+https://github.com/zinclabs/sdk-python-zincsearch.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/zinclabs/sdk-python-zincsearch.git)Then import the package:importzincsearch_sdkSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importzincsearch_sdkGetting StartedPlease follow theinstallation procedureand then run the following:importtimeimportzincsearch_sdkfrompprintimportpprintfromzincsearch_sdk.apiimportdocumentfromzincsearch_sdk.model.meta_http_response_documentimportMetaHTTPResponseDocumentfromzincsearch_sdk.model.meta_http_response_errorimportMetaHTTPResponseErrorfromzincsearch_sdk.model.meta_http_response_idimportMetaHTTPResponseIDfromzincsearch_sdk.model.meta_http_response_record_countimportMetaHTTPResponseRecordCountfromzincsearch_sdk.model.meta_json_ingestimportMetaJSONIngest# Defining the host is optional and defaults to http://localhost:4080# See configuration.py for a list of all supported configuration parameters.configuration=zincsearch_sdk.Configuration(host="http://localhost:4080")# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure HTTP basic authorization: basicAuthconfiguration=zincsearch_sdk.Configuration(username='YOUR_USERNAME',password='YOUR_PASSWORD')# Enter a context with an instance of the API clientwithzincsearch_sdk.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_instance=document.Document(api_client)query="query_example"# str | Querytry:# Bulk documentsapi_response=api_instance.bulk(query)pprint(api_response)exceptzincsearch_sdk.ApiExceptionase:print("Exception when calling Document->bulk:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttp://localhost:4080ClassMethodHTTP requestDescriptionDocumentbulkPOST/api/_bulkBulk documentsDocumentbulkv2POST/api/_bulkv2Bulkv2 documentsDocumentdeleteDELETE/api/{index}/_doc/{id}Delete documentDocumentes_bulkPOST/es/_bulkES bulk documentsDocumentindexPOST/api/{index}/_docCreate or update documentDocumentindex_with_idPUT/api/{index}/_doc/{id}Create or update document with idDocumentmultiPOST/api/{index}/_multiMulti documentsDocumentupdatePOST/api/{index}/_update/{id}Update document with idIndexadd_or_remove_es_aliasPOST/es/_aliasesAdd or remove index alias for compatible ESIndexanalyzePOST/api/_analyzeAnalyzeIndexanalyze_indexPOST/api/{index}/_analyzeAnalyzeIndexcreatePOST/api/indexCreate indexIndexcreate_templatePOST/es/_index_templateCreate update index templateIndexdeleteDELETE/api/index/{index}Delete indexIndexdelete_templateDELETE/es/_index_template/{name}Delete templateIndexe_s_create_indexPUT/es/{index}Create index for compatible ESIndexe_s_get_mappingGET/es/{index}/_mappingGet index mappings for compatible ESIndexes_existsHEAD/es/{index}Checks if the index exists for compatible ESIndexexistsHEAD/api/index/{index}Checks if the index existsIndexget_es_aliasesGET/es/{target}/_alias/{target_alias}Get index alias for compatible ESIndexget_indexGET/api/index/{index}Get index metadataIndexget_mappingGET/api/{index}/_mappingGet index mappingsIndexget_settingsGET/api/{index}/_settingsGet index settingsIndexget_templateGET/es/_index_template/{name}Get index templateIndexindex_name_listGET/api/index_nameList index NameIndexlistGET/api/indexList indexesIndexlist_templatesGET/es/_index_templateList index teplatesIndexrefreshPOST/api/index/{index}/refreshResfresh indexIndexset_mappingPUT/api/{index}/_mappingSet index mappingsIndexset_settingsPUT/api/{index}/_settingsSet index SettingsIndexupdate_templatePUT/es/_index_template/{name}Create update index templateSearchdelete_by_queryPOST/es/{index}/_delete_by_querySearches the index and deletes all matched documentsSearchmsearchPOST/es/_msearchSearch V2 MultipleSearch for compatible ESSearchsearchPOST/es/{index}/_searchSearch V2 DSL for compatible ESSearchsearch_v1POST/api/{index}/_searchSearch V1UsercreatePOST/api/userCreate userUserdeleteDELETE/api/user/{id}Delete userUserlistGET/api/userList userUserloginPOST/api/loginLoginUserupdatePUT/api/userUpdate userDefaulthealthzGET/healthzGet healthzDefaultversionGET/versionGet versionDocumentation For ModelsAggregationHistogramBoundAuthLoginRequestAuthLoginResponseAuthLoginUserIndexAnalyzeResponseIndexAnalyzeResponseTokenIndexIndexListResponseMetaAggregationAutoDateHistogramMetaAggregationDateHistogramMetaAggregationDateRangeMetaAggregationHistogramMetaAggregationIPRangeMetaAggregationMetricMetaAggregationRangeMetaAggregationResponseMetaAggregationsMetaAggregationsTermsMetaAnalyzerMetaBoolQueryMetaDateRangeMetaExistsQueryMetaFuzzyQueryMetaHTTPResponseMetaHTTPResponseDeleteByQueryMetaHTTPResponseDocumentMetaHTTPResponseErrorMetaHTTPResponseIDMetaHTTPResponseIndexMetaHTTPResponseRecordCountMetaHTTPResponseTemplateMetaHealthzResponseMetaHighlightMetaHitMetaHitsMetaHttpRetriesResponseMetaIPRangeMetaIdsQueryMetaIndexAnalysisMetaIndexSettingsMetaIndexSimpleMetaIndexTemplateMetaJSONIngestMetaMappingsMetaMatchBoolPrefixQueryMetaMatchPhrasePrefixQueryMetaMatchPhraseQueryMetaMatchQueryMetaMultiMatchQueryMetaPageMetaPrefixQueryMetaPropertyMetaQueryMetaQueryStringQueryMetaRangeMetaRangeQueryMetaRegexpQueryMetaSearchResponseMetaShardsMetaSimpleQueryStringQueryMetaTemplateMetaTemplateTemplateMetaTermQueryMetaTotalMetaUserMetaVersionResponseMetaWildcardQueryMetaZincQueryV1AggregationDateRangeV1AggregationNumberRangeV1AggregationParamsV1QueryParamsV1ZincQueryDocumentation For AuthorizationbasicAuthType: HTTP basic authenticationAuthorNotes for Large OpenAPI documentsIf the OpenAPI document is large, imports in zincsearch_sdk.apis and zincsearch_sdk.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 zincsearch_sdk.api.default_api import DefaultApifrom zincsearch_sdk.model.pet import PetSolution 2:
Before importing the package, adjust the maximum recursion limit as shown below:import sys
sys.setrecursionlimit(1500)
import zincsearch_sdk
from zincsearch_sdk.apis import *
from zincsearch_sdk.models import *Zinc Search engine API documents https://docs.zincsearch.com  # noqa: E501