Coverage for notion_client / __init__.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-17 21:35 +0000

1"""Package notion-sdk-py. 

2 

3A sync + async python client for the official Notion API. 

4Connect Notion pages and databases to the tools you use every day, 

5creating powerful workflows. 

6For more information visit https://github.com/ramnes/notion-sdk-py. 

7""" 

8 

9from .client import AsyncClient, Client, RetryOptions 

10from .errors import ( 

11 # Error codes 

12 NotionErrorCode, 

13 APIErrorCode, 

14 ClientErrorCode, 

15 # Error types 

16 NotionClientError, 

17 APIResponseError, 

18 UnknownHTTPResponseError, 

19 RequestTimeoutError, 

20 InvalidPathParameterError, 

21 # Error helpers 

22 is_notion_client_error, 

23 is_http_response_error, 

24) 

25from .helpers import ( 

26 collect_paginated_api, 

27 iterate_paginated_api, 

28 collect_data_source_templates, 

29 iterate_data_source_templates, 

30 is_full_block, 

31 is_full_data_source, 

32 is_full_database, 

33 is_full_page, 

34 is_full_user, 

35 is_full_comment, 

36 is_full_page_or_data_source, 

37 extract_notion_id, 

38 extract_database_id, 

39 extract_page_id, 

40 extract_block_id, 

41) 

42 

43__all__ = [ 

44 "AsyncClient", 

45 "Client", 

46 "RetryOptions", 

47 "NotionErrorCode", 

48 "APIErrorCode", 

49 "ClientErrorCode", 

50 "NotionClientError", 

51 "APIResponseError", 

52 "UnknownHTTPResponseError", 

53 "RequestTimeoutError", 

54 "InvalidPathParameterError", 

55 "is_notion_client_error", 

56 "is_http_response_error", 

57 "collect_paginated_api", 

58 "iterate_paginated_api", 

59 "collect_data_source_templates", 

60 "iterate_data_source_templates", 

61 "is_full_block", 

62 "is_full_data_source", 

63 "is_full_database", 

64 "is_full_page", 

65 "is_full_user", 

66 "is_full_comment", 

67 "is_full_page_or_data_source", 

68 "extract_notion_id", 

69 "extract_database_id", 

70 "extract_page_id", 

71 "extract_block_id", 

72]