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.16.6";
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 sha256 = "sha256-x8a2W64zLDi8r7d8B7GYCwWtSAB3BH+Sprbw+Xr7mH4=";
22 };
23
24 propagatedBuildInputs = [
25 requests
26 ];
27
28 checkInputs = [
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}