Notion API client SDK, rewritten in Python! (sync + async)
This report presents the forensic synthetic code analysis of ramnes/notion-sdk-py, a Python project with 2,174 GitHub stars. SynthScan v2.0 examined 20,459 lines of code across 157 source files, recording 263 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 14.4 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 263 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 39 | def remove_page_id_for_matches(r1, r2): | CODE |
| LOW | tests/conftest.py | 213 | def pending_single_file_upload_id(client): | CODE |
| LOW | tests/conftest.py | 222 | def pending_multi_file_upload_id(client): | CODE |
| LOW | tests/conftest.py | 234 | def part_uploaded_file_upload_id(client, pending_multi_file_upload_id): | CODE |
| LOW⚡ | tests/test_errors.py | 42 | def test_api_http_response_error(client): | CODE |
| LOW⚡ | tests/test_errors.py | 48 | async def test_async_api_response_error(async_client): | CODE |
| LOW⚡ | tests/test_errors.py | 55 | async def test_async_api_request_timeout_error(monkeypatch, async_client): | CODE |
| LOW⚡ | tests/test_errors.py | 66 | async def test_api_async_request_bad_request_error(async_client): | CODE |
| LOW⚡ | tests/test_errors.py | 72 | def test_api_response_error_request_id(client): | CODE |
| LOW⚡ | tests/test_errors.py | 81 | async def test_async_api_response_error_request_id(async_client): | CODE |
| LOW⚡ | tests/test_errors.py | 90 | def test_api_response_error_additional_data(client): | CODE |
| LOW⚡ | tests/test_errors.py | 100 | async def test_async_api_response_error_additional_data(async_client): | CODE |
| LOW⚡ | tests/test_errors.py | 109 | def test_is_notion_client_error(): | CODE |
| LOW⚡ | tests/test_errors.py | 441 | def test_is_notion_client_error_with_invalid_path_parameter_error(): | CODE |
| LOW⚡ | tests/test_errors.py | 447 | def test_validate_request_path_allows_valid_paths(): | CODE |
| LOW⚡ | tests/test_errors.py | 456 | def test_validate_request_path_rejects_literal_path_traversal(): | CODE |
| LOW | tests/test_errors.py | 31 | def test_api_request_timeout_error(monkeypatch, client): | CODE |
| LOW | tests/test_errors.py | 132 | def test_is_http_response_error(): | CODE |
| LOW | tests/test_errors.py | 155 | def test_request_timeout_error_static_method(): | CODE |
| LOW | tests/test_errors.py | 176 | def test_unknown_http_response_error_static_method(): | CODE |
| LOW | tests/test_errors.py | 196 | def test_api_response_error_static_method(): | CODE |
| LOW | tests/test_errors.py | 220 | def test_build_request_error_integration(client): | CODE |
| LOW | tests/test_errors.py | 235 | def test_build_request_error_creates_api_response_error(): | CODE |
| LOW | tests/test_errors.py | 290 | def test_build_request_error_creates_unknown_http_response_error(): | CODE |
| LOW | tests/test_errors.py | 345 | def test_unknown_http_response_error_default_message(): | CODE |
| LOW | tests/test_errors.py | 355 | def test_unknown_http_response_error_custom_message(): | CODE |
| LOW | tests/test_errors.py | 378 | def test_request_timeout_error_custom_message(): | CODE |
| LOW | tests/test_errors.py | 388 | async def test_request_timeout_error_reject_after_timeout(): | CODE |
| LOW | tests/test_errors.py | 406 | def test_invalid_path_parameter_error(): | CODE |
| LOW | tests/test_errors.py | 417 | def test_invalid_path_parameter_error_static_method(): | CODE |
| LOW | tests/test_errors.py | 473 | def test_validate_request_path_rejects_encoded_path_traversal(): | CODE |
| LOW | tests/test_errors.py | 493 | def test_validate_request_path_handles_invalid_percent_encoding(): | CODE |
| LOW⚡ | tests/test_endpoints.py | 273 | def test_views_queries_create(client, view_id): | CODE |
| LOW⚡ | tests/test_endpoints.py | 280 | def test_views_queries_results(client, view_id): | CODE |
| LOW⚡ | tests/test_endpoints.py | 288 | def test_views_queries_delete(client, view_id): | CODE |
| LOW⚡ | tests/test_endpoints.py | 349 | def test_pages_retrieve_markdown(client, page_id): | CODE |
| LOW⚡ | tests/test_endpoints.py | 355 | def test_pages_update_markdown(client, page_id): | CODE |
| LOW⚡ | tests/test_endpoints.py | 365 | def test_async_tasks_retrieve(client, page_id): | CODE |
| LOW | tests/test_endpoints.py | 41 | def test_pages_properties_retrieve(client, page_id): | CODE |
| LOW | tests/test_endpoints.py | 47 | def test_blocks_children_create(client, page_id) -> str: | CODE |
| LOW | tests/test_endpoints.py | 60 | def test_blocks_children_list(client, page_id): | CODE |
| LOW | tests/test_endpoints.py | 68 | def test_blocks_meeting_notes_query(client, mocker): | CODE |
| LOW | tests/test_endpoints.py | 194 | def test_data_sources_retrieve(client, data_source_id): | CODE |
| LOW | tests/test_endpoints.py | 214 | def test_data_sources_list_templates(client, data_source_id): | CODE |
| LOW | tests/test_endpoints.py | 403 | def test_file_uploads_create_multipart(client, mocker): | CODE |
| LOW | tests/test_endpoints.py | 430 | def test_file_uploads_create_external(client): | CODE |
| LOW | tests/test_endpoints.py | 444 | def test_file_uploads_retrieve(client, single_file_upload_id): | CODE |
| LOW | tests/test_endpoints.py | 466 | def test_file_uploads_list_with_status_filter(client, setup_file_uploads_ids): | CODE |
| LOW | tests/test_endpoints.py | 478 | def test_file_uploads_list_with_start_cursor(client, setup_file_uploads_ids): | CODE |
| LOW | tests/test_endpoints.py | 492 | def test_file_uploads_list_with_pagination(client, setup_file_uploads_ids): | CODE |
| LOW | tests/test_endpoints.py | 525 | def test_file_uploads_send_multipart(client, mocker): | CODE |
| LOW | tests/test_endpoints.py | 557 | def test_file_uploads_complete(client, mocker): | CODE |
| LOW | tests/test_endpoints.py | 612 | def test_oauth_token_with_basic_auth(client, mocker): | CODE |
| LOW | tests/test_endpoints.py | 648 | def test_oauth_revoke_with_basic_auth(client, mocker): | CODE |
| LOW | tests/test_endpoints.py | 694 | def test_oauth_token_authorization_code(client, mocker): | CODE |
| LOW | tests/test_endpoints.py | 726 | def test_oauth_token_refresh_token(client, mocker): | CODE |
| LOW | tests/test_webhooks.py | 4 | def test_sign_webhook_payload(): | CODE |
| LOW | tests/test_webhooks.py | 14 | def test_verify_webhook_signature(): | CODE |
| LOW⚡ | tests/test_helpers.py | 203 | def test_is_text_rich_text_item_response(client, text_block_id): | CODE |
| LOW⚡ | tests/test_helpers.py | 209 | def test_is_equation_rich_text_item_response(client, equation_block_id): | CODE |
| 117 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | notion_client/__init__.py | 9 | CODE | |
| LOW | notion_client/__init__.py | 9 | CODE | |
| LOW | notion_client/__init__.py | 9 | CODE | |
| LOW | notion_client/__init__.py | 10 | CODE | |
| LOW | notion_client/__init__.py | 10 | CODE | |
| LOW | notion_client/__init__.py | 10 | CODE | |
| LOW | notion_client/__init__.py | 10 | CODE | |
| LOW | notion_client/__init__.py | 10 | CODE | |
| LOW | notion_client/__init__.py | 10 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 18 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 33 | CODE | |
| LOW | notion_client/__init__.py | 51 | CODE | |
| LOW | notion_client/__init__.py | 51 | CODE | |
| LOW | notion_client/api_endpoints.py | 9 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | examples/intro_to_notion_api/basic/1_add_block.py | 18 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …amples/intro_to_notion_api/basic/3_add_styled_block.py | 18 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …amples/intro_to_notion_api/basic/2_add_linked_block.py | 18 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …s/intro_to_notion_api/intermediate/3_query_database.py | 20 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …ples/intro_to_notion_api/intermediate/5_upload_file.py | 18 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …o_to_notion_api/intermediate/2_add_page_to_database.py | 20 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …ntro_to_notion_api/intermediate/1_create_a_database.py | 18 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …es/intro_to_notion_api/intermediate/4_sort_database.py | 20 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tests/test_helpers.py | 461 | # Create a scenario that causes urlparse to fail | COMMENT |
| MEDIUM | examples/first_project/script.py | 34 | # Create a new page | COMMENT |
| MEDIUM | …s/intro_to_notion_api/intermediate/3_query_database.py | 62 | # Create a new database | COMMENT |
| MEDIUM | …ples/intro_to_notion_api/intermediate/5_upload_file.py | 87 | # Create a comment on the text block with the same image by providing | COMMENT |
| MEDIUM | …o_to_notion_api/intermediate/2_add_page_to_database.py | 41 | # Create a new database | COMMENT |
| MEDIUM | …ntro_to_notion_api/intermediate/1_create_a_database.py | 28 | # Create a new database | COMMENT |
| MEDIUM | …es/intro_to_notion_api/intermediate/4_sort_database.py | 70 | # Create a new database | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 66 | except Exception: | CODE |
| LOW | tests/conftest.py | 102 | except Exception: | CODE |
| LOW | tests/conftest.py | 320 | except Exception: | CODE |
| LOW | tests/conftest.py | 324 | except Exception: | CODE |
| LOW | notion_client/client.py | 393 | except Exception as error: | CODE |
| LOW | notion_client/client.py | 484 | except Exception as error: | CODE |
| LOW | examples/database_email_update/database_email_update.py | 125 | except Exception as e: | CODE |
| LOW | examples/databases/create_database.py | 34 | except Exception as e: | CODE |
| LOW | examples/file_uploads/create_file_uploads_multi.py | 78 | except Exception as e: | CODE |
| LOW | examples/file_uploads/create_file_uploads_multi.py | 110 | except Exception as exc: | CODE |
| LOW | examples/web_form_with_fastapi/web_form_with_fastapi.py | 64 | except Exception as error: | CODE |
| LOW | examples/web_form_with_fastapi/web_form_with_fastapi.py | 93 | except Exception as error: | CODE |
| LOW | examples/web_form_with_fastapi/web_form_with_fastapi.py | 115 | except Exception as error: | CODE |
| LOW | examples/web_form_with_fastapi/web_form_with_fastapi.py | 131 | except Exception as error: | CODE |
| LOW | .github/scripts/monitor_notion_changelog.py | 119 | except Exception as e: | CODE |
| LOW | .github/scripts/monitor_notion_changelog.py | 125 | except Exception as e: | CODE |
| LOW | .github/scripts/monitor_notion_changelog.py | 160 | except Exception as e: | CODE |
| MEDIUM | .github/scripts/monitor_notion_changelog.py | 116 | def main(): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | notion_client/client.py | 161 | CODE | |
| LOW | examples/generate_random_data/generate_random_data.py | 41 | CODE | |
| LOW | examples/generate_random_data/generate_random_data.py | 102 | CODE | |
| LOW | examples/databases/create_database.py | 16 | CODE | |
| LOW | …_from_any_block_type/parse_text_from_any_block_type.py | 48 | CODE | |
| LOW | examples/file_uploads/create_file_uploads_multi.py | 14 | CODE | |
| LOW | examples/file_uploads/create_file_uploads_extenal.py | 13 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | notion_client/helpers.py | 182 | # Check if it's already a properly formatted UUID | COMMENT |
| LOW | notion_client/helpers.py | 189 | # Check if it's a compact UUID (32 chars, no hyphens) | COMMENT |
| LOW | examples/file_uploads/create_file_uploads_multi.py | 114 | # Check if all parts uploaded successfully | COMMENT |
| LOW | .github/scripts/monitor_notion_changelog.py | 107 | # Check if an issue with same title exists | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | notion_client/client.py | 74 | auth: Bearer token for authentication. If left undefined, the `auth` parameter | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | notion_client/__init__.py | 56 | __all__ = [ | CODE |
| LOW | .github/scripts/monitor_notion_changelog.py | 14 | logger = logging.getLogger(__name__) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | README.md | 84 | 'person': {'email': 'avo@example.org'}, | CODE |