Skip to main content

Manticore Python client

Сlient for Manticore Search.

❗ WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-python/tree/11.2.0

Requirements.

Minimum Manticore Search version is >= 2.5.1 with HTTP protocol enabled.

*manticoresearch-python Manticore Search Python Compatibility
manticoresearch-devel dev (latest development version) 3.4 or newer ✅ Fully Compatible
11.2.0 or newer 28.6.6 or newer 3.4 or newer ✅ Fully Compatible
11.2.0 or newer 17.5.1 to 28.6.6 3.4 or newer ⚠️ Partially Compatible
11.0.0 to 11.2.0 28.6.6 or newer 3.4 or newer ⚠️ Partially Compatible
11.0.0 to 11.2.0 17.5.1 to 28.6.6 3.4 or newer ✅ Fully Compatible
8.0.0 to 11.0.0 17.5.1 to 28.6.6 3.4 or newer ⚠️ Partially Compatible
8.0.0 to 11.0.0 9.2.14 to 17.5.1 3.4 or newer ✅ Fully Compatible
6.0.0 to 8.0.0 9.2.14 to 17.5.1 3.4 or newer ⚠️ Partially Compatible
6.0.0 to 8.0.0 7.0.0 to 9.2.14 3.4 or newer ✅ Fully Compatible
6.0.0 to 8.0.0 6.2.1 to 7.0.0 3.4 or newer ⚠️ Partially Compatible
3.3.1 to 6.0.0 7.0.0 to 9.2.14 3.4 or newer ⚠️ Partially Compatible
3.3.1 to 6.0.0 6.2.1 to 7.0.0 3.4 or newer ✅ Fully Compatible
2.0.0 to 3.3.1 6.2.0 to 7.0.0 3.4 or newer ⚠️ Partially Compatible
2.0.0 to 3.3.1 4.2.1 to 6.2.0 3.4 or newer ✅ Fully Compatible
1.0.6 to 2.0.0 4.0.2 to 4.2.1 3.4 or newer ✅ Fully Compatible
1.0.5 to 1.0.6 4.0.2 to 4.2.1 2.7 or newer ⚠️ Partially Compatible
1.0.5 to 1.0.6 2.5.1 to 4.0.2 2.7 or newer ✅ Fully Compatible

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/manticoresoftware/manticoresearch-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/manticoresoftware/manticoresearch-python.git)

Then import the package:

import manticoresearch

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import manticoresearch

Getting Started

Please follow the installation procedure and then run the following:

import manticoresearch
from manticoresearch.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://127.0.0.1:9308
# See configuration.py for a list of all supported configuration parameters.
configuration = manticoresearch.Configuration(
    host = "http://127.0.0.1:9308"
)



# Enter a context with an instance of the API client
with manticoresearch.ApiClient(configuration) as api_client:
    # Create instances of API classes
    indexApi = manticoresearch.IndexApi(api_client)
    searchApi = manticoresearch.SearchApi(api_client)
    utilsApi = manticoresearch.UtilsApi(api_client)

    try:
        # Perform insert and search operations    
        newDoc = {"title" : "Crossbody Bag with Tassel", "price": 19.85}
        insert_request = InsertDocumentRequest(index="products", doc=newDoc)
        indexApi.insert(insert_request)
        
        # Check out the structure of the autocreated 'products' table
        sql_response = utilsApi.sql('DESC products');
        print("The response of UtilsApi->sql:\n")
        pprint(sql_response) 

        newDoc = {"title" : "Pet Hair Remover Glove", "price": 7.99}
        insert_request = InsertDocumentRequest(index="products", doc=newDoc)
        indexApi.insert(insert_request)
        
        query_highlight = Highlight()
        query_highlight.fields = {"title":{}}
        search_query = SearchQuery(query_string="@title bag")
        search_request = SearchRequest(index="products", query=search_query, highlight=query_highlight)
        search_response = searchApi.search(search_request)    
        print("The response of SearchApi->search:\n")
        pprint(search_response)

        # Alternatively, you can pass all request arguments as a complex JSON object        
        indexApi.insert({"index": "products", "doc" : {"title" : "Crossbody Bag with Tassel", "price" : 19.85}})
        indexApi.insert({"index": "products", "doc" : {"title" : "Pet Hair Remover Glove", "price" : 7.99}})
        search_response = searchApi.search({"index": "products", "query": {"query_string": "@title bag"}, "highlight":{"fields":{"title":{}}}})
        print("The response of SearchApi->search:\n")
        pprint(search_response)
    except ApiException as e:
        print("Exception when calling Api method: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://127.0.0.1:9308

Class Method HTTP request Description
IndexApi bulk POST /bulk Bulk table operations
IndexApi delete POST /delete Delete a document in a table
IndexApi insert POST /insert Create a new document in a table
IndexApi partial_replace POST /{table}/_update/{id} Partially replaces a document in a table
IndexApi replace POST /replace Replace new document in a table
IndexApi update POST /update Update a document in a table
SearchApi autocomplete POST /autocomplete Performs an autocomplete search on a table
SearchApi percolate POST /pq/{table}/search Perform reverse search on a percolate table
SearchApi search POST /search Performs a search on a table
UtilsApi sql POST /sql Perform SQL requests
UtilsApi token POST /token Create or rotate a bearer token

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

bearerAuth

  • Type: Bearer authentication

Author

info@manticoresearch.com

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

manticoresearch_devel-11.2.0.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

manticoresearch_devel-11.2.0-py3-none-any.whl (128.1 kB view details)

Uploaded Python 3

File details

Details for the file manticoresearch_devel-11.2.0.tar.gz.

File metadata

  • Download URL: manticoresearch_devel-11.2.0.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.20

File hashes

Hashes for manticoresearch_devel-11.2.0.tar.gz
Algorithm Hash digest
SHA256 877b8f4df01c0f36f383db3ff3018fce3086f30a2b4ff5594163a4c3c74344b6
MD5 83afd180f42fcfb080a8e262be909d87
BLAKE2b-256 68fb8a4b0f5a3be9abea81d723956e56abc5b81cf035a2f4f669a6ffbf4ab482

See more details on using hashes here.

File details

Details for the file manticoresearch_devel-11.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for manticoresearch_devel-11.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c41fea2a33c2ba4211ca6a4687d2c40b46e3d2c7af413f082c4e70ec26f9eb42
MD5 5dd13668e18a30d8d2edbba4ffa0634b
BLAKE2b-256 f5227e3b8c600362b954294c51d81993698555e9104359a5e29fb33cb8ff1dec

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

11.2.0 This release

2 files

11.1.1

2 files

9.1.25073013

2 files

9.0.25072219

2 files

8.0.25060414

2 files

8.0.25050900

2 files

8.0.25042416

2 files

8.0.25042414

2 files

8.0.25040118

2 files

7.0.25032822

2 files

7.0.25021221

2 files

7.0.25020720

2 files

6.0.25020319

2 files

6.0.25013023

2 files

5.0.24102221

2 files

4.3.24041813

2 files

4.2.24041700

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page