1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pytest-asyncio,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "throttler";
12 version = "1.2.2";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "uburuntu";
17 repo = "throttler";
18 tag = "v${version}";
19 hash = "sha256-fE35zPjBUn4e1VRkkIUMtYJ/+LbnUxnxyfnU+UEPwr4=";
20 };
21
22 build-system = [ setuptools ];
23
24 checkInputs = [
25 pytest-asyncio
26 pytestCheckHook
27 ];
28
29 enabledTestPaths = [ "tests/" ];
30
31 disabledTestPaths = [
32 # time sensitive tests
33 "tests/test_execution_timer.py"
34 ];
35
36 meta = {
37 changelog = "https://github.com/uburuntu/throttler/releases/tag/${src.tag}";
38 description = "Zero-dependency Python package for easy throttling with asyncio support";
39 homepage = "https://github.com/uburuntu/throttler";
40 license = lib.licenses.mit;
41 maintainers = with lib.maintainers; [ renatoGarcia ];
42 };
43}