about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/qdrant-client/default.nix
blob: e57e607afcf3a41103e745fb3ad3007bb0f7593b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{ lib
, buildPythonPackage
, fetchFromGitHub
, grpcio
, grpcio-tools
, httpx
, numpy
, pytestCheckHook
, poetry-core
, pydantic
, pythonOlder
, urllib3
, portalocker
, fastembed
# check inputs
, pytest-asyncio
}:

buildPythonPackage rec {
  pname = "qdrant-client";
  version = "1.7.0";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "qdrant";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-fC28uQK4mAN21VdAeT4NbezZY1qZVOIK3rs3v31S39Q=";
  };

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    numpy
    httpx
    grpcio
    # typing-extensions
    grpcio-tools
    pydantic
    urllib3
    portalocker
  ] ++ httpx.optional-dependencies.http2;

  pythonImportsCheck = [
    "qdrant_client"
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-asyncio
  ];

  # tests require network access
  doCheck = false;

  passthru.optional-dependencies = {
    fastembed = [ fastembed ];
  };

  meta = with lib; {
    description = "Python client for Qdrant vector search engine";
    homepage = "https://github.com/qdrant/qdrant-client";
    changelog = "https://github.com/qdrant/qdrant-client/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ happysalada ];
  };
}