Coverage for notion_client / __init__.py: 100%

4 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-23 09:42 +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 

10from .errors import ( 

11 # Error codes 

12 NotionErrorCode, 

13 APIErrorCode, 

14 ClientErrorCode, 

15 # Error types 

16 NotionClientError, 

17 APIResponseError, 

18 UnknownHTTPResponseError, 

19 RequestTimeoutError, 

20 # Error helpers 

21 is_notion_client_error, 

22) 

23from .helpers import ( 

24 collect_paginated_api, 

25 iterate_paginated_api, 

26 collect_data_source_templates, 

27 iterate_data_source_templates, 

28 is_full_block, 

29 is_full_data_source, 

30 is_full_database, 

31 is_full_page, 

32 is_full_user, 

33 is_full_comment, 

34 is_full_page_or_data_source, 

35 extract_notion_id, 

36 extract_database_id, 

37 extract_page_id, 

38 extract_block_id, 

39) 

40 

41__all__ = [ 

42 "AsyncClient", 

43 "Client", 

44 "NotionErrorCode", 

45 "APIErrorCode", 

46 "ClientErrorCode", 

47 "NotionClientError", 

48 "APIResponseError", 

49 "UnknownHTTPResponseError", 

50 "RequestTimeoutError", 

51 "is_notion_client_error", 

52 "collect_paginated_api", 

53 "iterate_paginated_api", 

54 "collect_data_source_templates", 

55 "iterate_data_source_templates", 

56 "is_full_block", 

57 "is_full_data_source", 

58 "is_full_database", 

59 "is_full_page", 

60 "is_full_user", 

61 "is_full_comment", 

62 "is_full_page_or_data_source", 

63 "extract_notion_id", 

64 "extract_database_id", 

65 "extract_page_id", 

66 "extract_block_id", 

67]