1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonOlder
6, requests
7, requests-mock
8}:
9
10buildPythonPackage rec {
11 pname = "losant-rest";
12 version = "1.19.2";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "Losant";
19 repo = "losant-rest-python";
20 rev = "v${version}";
21 hash = "sha256-JaXADzNxRqumjx6FZxJj6ioMVdUMR6S1FQQ6QcP8S5Q=";
22 };
23
24 propagatedBuildInputs = [
25 requests
26 ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 requests-mock
31 ];
32
33 pytestFlagsArray = [
34 "tests/losantrest_tests.py"
35 ];
36
37 pythonImportsCheck = [
38 "losantrest"
39 ];
40
41 meta = with lib; {
42 description = "Python module for consuming the Losant IoT Platform API";
43 homepage = "https://github.com/Losant/losant-rest-python";
44 license = licenses.mit;
45 maintainers = with maintainers; [ fab ];
46 };
47}