All Projects → meilisearch → Meilisearch Python

meilisearch / Meilisearch Python

Licence: mit
Python wrapper for the MeiliSearch API

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Meilisearch Python

Meilisearch Js
Javascript client for the MeiliSearch API
Stars: ✭ 183 (+144%)
Mutual labels:  sdk, client
Aliyun Cli
Alibaba Cloud CLI
Stars: ✭ 561 (+648%)
Mutual labels:  sdk, client
Sdk
Library for using Grafana' structures in Go programs and client for Grafana REST API.
Stars: ✭ 193 (+157.33%)
Mutual labels:  sdk, client
Uploadcare Php
PHP API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
Stars: ✭ 77 (+2.67%)
Mutual labels:  sdk, client
Aliyun Openapi Java Sdk
Alibaba Cloud SDK for Java
Stars: ✭ 1,170 (+1460%)
Mutual labels:  sdk, client
Open62541
Open source implementation of OPC UA (OPC Unified Architecture) aka IEC 62541 licensed under Mozilla Public License v2.0
Stars: ✭ 1,643 (+2090.67%)
Mutual labels:  sdk, client
Aliyun Openapi Net Sdk
Alibaba Cloud SDK for .NET
Stars: ✭ 467 (+522.67%)
Mutual labels:  sdk, client
Flickr Sdk
Almost certainly the best Flickr API client in the world for node and the browser
Stars: ✭ 104 (+38.67%)
Mutual labels:  sdk, client
Gentleman
Full-featured, plugin-driven, extensible HTTP client toolkit for Go
Stars: ✭ 886 (+1081.33%)
Mutual labels:  sdk, client
Graphql
Simple low-level GraphQL HTTP client for Go
Stars: ✭ 682 (+809.33%)
Mutual labels:  sdk, client
Openapi Sdk Php Client
Official repository of the Alibaba Cloud Client for PHP
Stars: ✭ 206 (+174.67%)
Mutual labels:  sdk, client
Vainglory
(*DEPRECATED*: The API no longer exists, so this will no longer work) A Javascript API Client wrapper for Vainglory
Stars: ✭ 32 (-57.33%)
Mutual labels:  sdk, client
Milo
Eclipse Milo™ - an open source implementation of OPC UA (IEC 62541).
Stars: ✭ 587 (+682.67%)
Mutual labels:  sdk, client
Openapi Core Ruby Sdk
Alibaba Cloud Core SDK for Ruby
Stars: ✭ 29 (-61.33%)
Mutual labels:  sdk, client
Libra Grpc
A lightweight JavaScript library for Libra
Stars: ✭ 69 (-8%)
Mutual labels:  sdk, client
Css Vars Ponyfill
Client-side support for CSS custom properties (aka "CSS variables") in legacy and modern browsers
Stars: ✭ 1,166 (+1454.67%)
Mutual labels:  client
Bittorrent Tracker
🌊 Simple, robust, BitTorrent tracker (client & server) implementation
Stars: ✭ 1,184 (+1478.67%)
Mutual labels:  client
Cups Ipp
CUPS Implementation of IPP - PHP Client API
Stars: ✭ 70 (-6.67%)
Mutual labels:  client
Dart algolia
[Unofficial] Algolia is a pure dart SDK, wrapped around Algolia REST API for easy implementation for your Flutter or Dart projects.
Stars: ✭ 70 (-6.67%)
Mutual labels:  sdk
Hera
A framework for running WeChat applet. (小程序 SDK,小程序转 H5,小程序转安卓、iOS 原生应用、小程序渲染引擎)
Stars: ✭ 1,186 (+1481.33%)
Mutual labels:  sdk

MeiliSearch-Python

MeiliSearch Python

MeiliSearch | Documentation | Slack | Roadmap | Website | FAQ

PyPI version Test Status License Bors enabled

⚡ The MeiliSearch API client written for Python 🐍

MeiliSearch Python is the MeiliSearch API client for Python developers.

MeiliSearch is an open-source search engine. Discover what MeiliSearch is!

Table of Contents

📖 Documentation

See our Documentation or our API References.

🔧 Installation

Note: Python 3.6+ is required.

With pip3 in command line:

pip3 install meilisearch

Run MeiliSearch

There are many easy ways to download and run a MeiliSearch instance.

For example, if you use Docker:

docker pull getmeili/meilisearch:latest # Fetch the latest version of MeiliSearch image from Docker Hub
docker run -it --rm -p 7700:7700 getmeili/meilisearch:latest ./meilisearch --master-key=masterKey

NB: you can also download MeiliSearch from Homebrew or APT.

🚀 Getting Started

Add Documents

import meilisearch

client = meilisearch.Client('http://127.0.0.1:7700', 'masterKey')

# An index is where the documents are stored.
index = client.index('books')

documents = [
  { 'book_id': 123,  'title': 'Pride and Prejudice' },
  { 'book_id': 456,  'title': 'Le Petit Prince' },
  { 'book_id': 1,    'title': 'Alice In Wonderland' },
  { 'book_id': 1344, 'title': 'The Hobbit' },
  { 'book_id': 4,    'title': 'Harry Potter and the Half-Blood Prince' },
  { 'book_id': 42,   'title': 'The Hitchhiker\'s Guide to the Galaxy' }
]

# If the index 'books' does not exist, MeiliSearch creates it when you first add the documents.
index.add_documents(documents) # => { "updateId": 0 }

With the updateId, you can check the status (enqueued, processed or failed) of your documents addition using the update endpoint.

Basic Search

# MeiliSearch is typo-tolerant:
index.search('harry pottre')

Output:

{
  "hits" => [{
    "book_id" => 4,
    "title" => "Harry Potter and the Half-Blood Prince"
  }],
  "offset" => 0,
  "limit" => 20,
  "processingTimeMs" => 1,
  "query" => "harry pottre"
}

Custom Search

All the supported options are described in the search parameters section of the documentation.

index.search(
  'prince',
  {
    'attributesToHighlight': ['title'],
    'filters': 'book_id > 10'
  }
)

JSON output:

{
    "hits": [
        {
            "book_id": 456,
            "title": "Le Petit Prince",
            "_formatted": {
                "book_id": 456,
                "title": "Le Petit <em>Prince</em>"
            }
        }
    ],
    "offset": 0,
    "limit": 20,
    "processingTimeMs": 10,
    "query": "prince"
}

🤖 Compatibility with MeiliSearch

This package only guarantees the compatibility with the version v0.19.0 of MeiliSearch.

💡 Learn More

The following sections may interest you:

⚙️ Development Workflow and Contributing

Any new contribution is more than welcome in this project!

If you want to know more about the development workflow or want to contribute, please visit our contributing guidelines for detailed instructions!


MeiliSearch provides and maintains many SDKs and Integration tools like this one. We want to provide everyone with an amazing search experience for any kind of project. If you want to contribute, make suggestions, or just know what's going on right now, visit us in the integration-guides repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].