nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 anyio,
4 buildPythonPackage,
5 fetchFromGitHub,
6 httpx,
7 pytest-asyncio,
8 pytest-cov-stub,
9 pytest-vcr,
10 pytestCheckHook,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "notion-client";
16 version = "2.7.0";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "ramnes";
21 repo = "notion-sdk-py";
22 tag = version;
23 hash = "sha256-15IPycaLk8r0/bUphL+IDypBMhgdX1tAUS50VD3p/00=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [ httpx ];
29
30 nativeCheckInputs = [
31 anyio
32 pytest-asyncio
33 pytest-cov-stub
34 pytest-vcr
35 pytestCheckHook
36 ];
37
38 pythonImportsCheck = [ "notion_client" ];
39
40 disabledTests = [
41 # Test requires network access
42 "test_api_http_response_error"
43 ];
44
45 meta = {
46 description = "Python client for the official Notion API";
47 homepage = "https://github.com/ramnes/notion-sdk-py";
48 changelog = "https://github.com/ramnes/notion-sdk-py/releases/tag/${src.tag}";
49 license = lib.licenses.mit;
50 maintainers = with lib.maintainers; [ jpetrucciani ];
51 };
52}