meilisearch-python icon indicating copy to clipboard operation
meilisearch-python copied to clipboard

Proposal: Auto-download and run Meilisearch binary like SQLite

Open tpayet opened this issue 8 months ago • 2 comments

Following a discussion I had with @mishig25, we could simplify the usage of this Python library by having a Meilisearch binary automatically downloaded and runned just like SQLite.

For example, on instanciating of the client instance meilisearch.Client(), when no api-key or url is given to the client, the library could use the meilisearch binary and exec it from the PATH. If no meilisearch binary is available in PATH, it could download and install it in the PATH

We might want to focus onFollowing a conversation with @mishig25, we believe we can simplify the developer experience for this Python SDK by having it automatically handle the Meilisearch binary—similar to how SQLite is used in Python.

🔧 Suggested behavior

When a meilisearch.Client() is instantiated without specifying a URL or API key, the SDK should: 1. Check for a local Meilisearch binary in the system PATH. 2. If not found, automatically download and install the appropriate Meilisearch binary into PATH. 3. Launch the binary and use it as the underlying instance for the client.

I suggest focusing on Unix-based platforms first (Linux/macOS) to keep the initial implementation simple.

💡 Why this matters

We’re seeing a growing number of developers using Python to build prototypes (e.g. AI agents, RAG pipelines) with Meilisearch. Reducing the setup friction—especially around installing and running a Meilisearch instance—could significantly boost adoption and ease-of-use. Unix platform first to make the implementation easier.

This would be important for adoption as we see more and more people using Python and building POC of agents or RAG pipelines using Meilisearch. If we can lighten the workload to get started with Meilisearch, it would be awesome 🔥

tpayet avatar Apr 29 '25 10:04 tpayet

Super interesting! My question is, more specifically, is it something Python users want by default? For example if they use docker, how do you check meilisearch binary in the PATH? Do you think is it something users want by default to have a part of their code installing a binary without their consent? meilisearch.Client() is for example not obvious at all a binary will be installed on their machine

I guess anyway we could have an option we pass to the client to make it download. If they follow our documentation with this option, it should not put any friction for them, because just a copy/paste I really like the idea of providing a way to simplify the first steps!

curquiza avatar Apr 29 '25 10:04 curquiza

My question is, more specifically, is it something Python users want by default?

I don't know but as long as it's transparent I guess that's cool, we need to document it in the README and have some logs on stderr

For example if they use docker, how do you check meilisearch binary in the PATH?

I would keep the actual behavior, if no meilisearch is found in PATH and it's not possible to install it, the library whould throw an error asking for a host & api_key

Do you think is it something users want by default to have a part of their code installing a binary without their consent?

I don't know, there is no way to know or not but again, as long as we disclose it in the README & in the logs it should be fine :)

tpayet avatar Apr 29 '25 12:04 tpayet