1{ lib
2, buildPythonPackage
3, camel-converter
4, fetchFromGitHub
5, pythonOlder
6, setuptools
7, requests
8}:
9
10buildPythonPackage rec {
11 pname = "meilisearch";
12 version = "0.28.0";
13 format = "pyproject";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "meilisearch";
19 repo = "meilisearch-python";
20 rev = "refs/tags/v${version}";
21 hash = "sha256-gSJ7B2QaO6ei1wJwxpN/ciZ7VH6Bg1Qp8bUlrdLxtCs=";
22 };
23
24 nativeBuildInputs = [
25 setuptools
26 ];
27
28 propagatedBuildInputs = [
29 camel-converter
30 requests
31 ] ++ camel-converter.optional-dependencies.pydantic;
32
33 pythonImportsCheck = [
34 "meilisearch"
35 ];
36
37 # Tests spin up a local server and are not mocking the requests
38 doCheck = false;
39
40 meta = with lib; {
41 description = "Client for the Meilisearch API";
42 homepage = "https://github.com/meilisearch/meilisearch-python";
43 changelog = "https://github.com/meilisearch/meilisearch-python/releases/tag/v${version}";
44 license = with licenses; [ mit ];
45 maintainers = with maintainers; [ fab ];
46 };
47}