Repository Analysis

ramnes/notion-sdk-py

Notion API client SDK, rewritten in Python! (sync + async)

14.4 Low AI signal View on GitHub

Analysis Overview

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).

14.4
Adjusted Score
14.4
Raw Score
100%
Time Factor
2026-08-09
Last Push
2.2K
Stars
Python
Language
20.5K
Lines of Code
157
Files
263
Pattern Hits
2026-08-09
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 1MEDIUM 16LOW 246

Directory Score Breakdown

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.

Pattern Findings

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.

Hyper-Verbose Identifiers177 hits · 181 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py39 def remove_page_id_for_matches(r1, r2):CODE
LOWtests/conftest.py213def pending_single_file_upload_id(client):CODE
LOWtests/conftest.py222def pending_multi_file_upload_id(client):CODE
LOWtests/conftest.py234def part_uploaded_file_upload_id(client, pending_multi_file_upload_id):CODE
LOWtests/test_errors.py42def test_api_http_response_error(client):CODE
LOWtests/test_errors.py48async def test_async_api_response_error(async_client):CODE
LOWtests/test_errors.py55async def test_async_api_request_timeout_error(monkeypatch, async_client):CODE
LOWtests/test_errors.py66async def test_api_async_request_bad_request_error(async_client):CODE
LOWtests/test_errors.py72def test_api_response_error_request_id(client):CODE
LOWtests/test_errors.py81async def test_async_api_response_error_request_id(async_client):CODE
LOWtests/test_errors.py90def test_api_response_error_additional_data(client):CODE
LOWtests/test_errors.py100async def test_async_api_response_error_additional_data(async_client):CODE
LOWtests/test_errors.py109def test_is_notion_client_error():CODE
LOWtests/test_errors.py441def test_is_notion_client_error_with_invalid_path_parameter_error():CODE
LOWtests/test_errors.py447def test_validate_request_path_allows_valid_paths():CODE
LOWtests/test_errors.py456def test_validate_request_path_rejects_literal_path_traversal():CODE
LOWtests/test_errors.py31def test_api_request_timeout_error(monkeypatch, client):CODE
LOWtests/test_errors.py132def test_is_http_response_error():CODE
LOWtests/test_errors.py155def test_request_timeout_error_static_method():CODE
LOWtests/test_errors.py176def test_unknown_http_response_error_static_method():CODE
LOWtests/test_errors.py196def test_api_response_error_static_method():CODE
LOWtests/test_errors.py220def test_build_request_error_integration(client):CODE
LOWtests/test_errors.py235def test_build_request_error_creates_api_response_error():CODE
LOWtests/test_errors.py290def test_build_request_error_creates_unknown_http_response_error():CODE
LOWtests/test_errors.py345def test_unknown_http_response_error_default_message():CODE
LOWtests/test_errors.py355def test_unknown_http_response_error_custom_message():CODE
LOWtests/test_errors.py378def test_request_timeout_error_custom_message():CODE
LOWtests/test_errors.py388async def test_request_timeout_error_reject_after_timeout():CODE
LOWtests/test_errors.py406def test_invalid_path_parameter_error():CODE
LOWtests/test_errors.py417def test_invalid_path_parameter_error_static_method():CODE
LOWtests/test_errors.py473def test_validate_request_path_rejects_encoded_path_traversal():CODE
LOWtests/test_errors.py493def test_validate_request_path_handles_invalid_percent_encoding():CODE
LOWtests/test_endpoints.py273def test_views_queries_create(client, view_id):CODE
LOWtests/test_endpoints.py280def test_views_queries_results(client, view_id):CODE
LOWtests/test_endpoints.py288def test_views_queries_delete(client, view_id):CODE
LOWtests/test_endpoints.py349def test_pages_retrieve_markdown(client, page_id):CODE
LOWtests/test_endpoints.py355def test_pages_update_markdown(client, page_id):CODE
LOWtests/test_endpoints.py365def test_async_tasks_retrieve(client, page_id):CODE
LOWtests/test_endpoints.py41def test_pages_properties_retrieve(client, page_id):CODE
LOWtests/test_endpoints.py47def test_blocks_children_create(client, page_id) -> str:CODE
LOWtests/test_endpoints.py60def test_blocks_children_list(client, page_id):CODE
LOWtests/test_endpoints.py68def test_blocks_meeting_notes_query(client, mocker):CODE
LOWtests/test_endpoints.py194def test_data_sources_retrieve(client, data_source_id):CODE
LOWtests/test_endpoints.py214def test_data_sources_list_templates(client, data_source_id):CODE
LOWtests/test_endpoints.py403def test_file_uploads_create_multipart(client, mocker):CODE
LOWtests/test_endpoints.py430def test_file_uploads_create_external(client):CODE
LOWtests/test_endpoints.py444def test_file_uploads_retrieve(client, single_file_upload_id):CODE
LOWtests/test_endpoints.py466def test_file_uploads_list_with_status_filter(client, setup_file_uploads_ids):CODE
LOWtests/test_endpoints.py478def test_file_uploads_list_with_start_cursor(client, setup_file_uploads_ids):CODE
LOWtests/test_endpoints.py492def test_file_uploads_list_with_pagination(client, setup_file_uploads_ids):CODE
LOWtests/test_endpoints.py525def test_file_uploads_send_multipart(client, mocker):CODE
LOWtests/test_endpoints.py557def test_file_uploads_complete(client, mocker):CODE
LOWtests/test_endpoints.py612def test_oauth_token_with_basic_auth(client, mocker):CODE
LOWtests/test_endpoints.py648def test_oauth_revoke_with_basic_auth(client, mocker):CODE
LOWtests/test_endpoints.py694def test_oauth_token_authorization_code(client, mocker):CODE
LOWtests/test_endpoints.py726def test_oauth_token_refresh_token(client, mocker):CODE
LOWtests/test_webhooks.py4def test_sign_webhook_payload():CODE
LOWtests/test_webhooks.py14def test_verify_webhook_signature():CODE
LOWtests/test_helpers.py203def test_is_text_rich_text_item_response(client, text_block_id):CODE
LOWtests/test_helpers.py209def test_is_equation_rich_text_item_response(client, equation_block_id):CODE
117 more matches not shown…
Unused Imports38 hits · 29 pts
SeverityFileLineSnippetContext
LOWnotion_client/__init__.py9CODE
LOWnotion_client/__init__.py9CODE
LOWnotion_client/__init__.py9CODE
LOWnotion_client/__init__.py10CODE
LOWnotion_client/__init__.py10CODE
LOWnotion_client/__init__.py10CODE
LOWnotion_client/__init__.py10CODE
LOWnotion_client/__init__.py10CODE
LOWnotion_client/__init__.py10CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py18CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py33CODE
LOWnotion_client/__init__.py51CODE
LOWnotion_client/__init__.py51CODE
LOWnotion_client/api_endpoints.py9CODE
Decorative Section Separators8 hits · 24 pts
SeverityFileLineSnippetContext
MEDIUMexamples/intro_to_notion_api/basic/1_add_block.py18# ---------------------------------------------------------------------------COMMENT
MEDIUM…amples/intro_to_notion_api/basic/3_add_styled_block.py18# ---------------------------------------------------------------------------COMMENT
MEDIUM…amples/intro_to_notion_api/basic/2_add_linked_block.py18# ---------------------------------------------------------------------------COMMENT
MEDIUM…s/intro_to_notion_api/intermediate/3_query_database.py20# ---------------------------------------------------------------------------COMMENT
MEDIUM…ples/intro_to_notion_api/intermediate/5_upload_file.py18# ---------------------------------------------------------------------------COMMENT
MEDIUM…o_to_notion_api/intermediate/2_add_page_to_database.py20# ---------------------------------------------------------------------------COMMENT
MEDIUM…ntro_to_notion_api/intermediate/1_create_a_database.py18# ---------------------------------------------------------------------------COMMENT
MEDIUM…es/intro_to_notion_api/intermediate/4_sort_database.py20# ---------------------------------------------------------------------------COMMENT
Self-Referential Comments7 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_helpers.py461 # Create a scenario that causes urlparse to failCOMMENT
MEDIUMexamples/first_project/script.py34# Create a new pageCOMMENT
MEDIUM…s/intro_to_notion_api/intermediate/3_query_database.py62 # Create a new databaseCOMMENT
MEDIUM…ples/intro_to_notion_api/intermediate/5_upload_file.py87 # Create a comment on the text block with the same image by providingCOMMENT
MEDIUM…o_to_notion_api/intermediate/2_add_page_to_database.py41 # Create a new databaseCOMMENT
MEDIUM…ntro_to_notion_api/intermediate/1_create_a_database.py28 # Create a new databaseCOMMENT
MEDIUM…es/intro_to_notion_api/intermediate/4_sort_database.py70 # Create a new databaseCOMMENT
Excessive Try-Catch Wrapping18 hits · 19 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py66 except Exception:CODE
LOWtests/conftest.py102 except Exception:CODE
LOWtests/conftest.py320 except Exception:CODE
LOWtests/conftest.py324 except Exception:CODE
LOWnotion_client/client.py393 except Exception as error:CODE
LOWnotion_client/client.py484 except Exception as error:CODE
LOWexamples/database_email_update/database_email_update.py125 except Exception as e:CODE
LOWexamples/databases/create_database.py34 except Exception as e:CODE
LOWexamples/file_uploads/create_file_uploads_multi.py78 except Exception as e:CODE
LOWexamples/file_uploads/create_file_uploads_multi.py110 except Exception as exc:CODE
LOWexamples/web_form_with_fastapi/web_form_with_fastapi.py64 except Exception as error:CODE
LOWexamples/web_form_with_fastapi/web_form_with_fastapi.py93 except Exception as error:CODE
LOWexamples/web_form_with_fastapi/web_form_with_fastapi.py115 except Exception as error:CODE
LOWexamples/web_form_with_fastapi/web_form_with_fastapi.py131 except Exception as error:CODE
LOW.github/scripts/monitor_notion_changelog.py119 except Exception as e:CODE
LOW.github/scripts/monitor_notion_changelog.py125 except Exception as e:CODE
LOW.github/scripts/monitor_notion_changelog.py160 except Exception as e:CODE
MEDIUM.github/scripts/monitor_notion_changelog.py116def main():CODE
Deep Nesting7 hits · 7 pts
SeverityFileLineSnippetContext
LOWnotion_client/client.py161CODE
LOWexamples/generate_random_data/generate_random_data.py41CODE
LOWexamples/generate_random_data/generate_random_data.py102CODE
LOWexamples/databases/create_database.py16CODE
LOW…_from_any_block_type/parse_text_from_any_block_type.py48CODE
LOWexamples/file_uploads/create_file_uploads_multi.py14CODE
LOWexamples/file_uploads/create_file_uploads_extenal.py13CODE
Redundant / Tautological Comments4 hits · 6 pts
SeverityFileLineSnippetContext
LOWnotion_client/helpers.py182 # Check if it's already a properly formatted UUIDCOMMENT
LOWnotion_client/helpers.py189 # Check if it's a compact UUID (32 chars, no hyphens)COMMENT
LOWexamples/file_uploads/create_file_uploads_multi.py114 # Check if all parts uploaded successfullyCOMMENT
LOW.github/scripts/monitor_notion_changelog.py107 # Check if an issue with same title existsCOMMENT
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHnotion_client/client.py74 auth: Bearer token for authentication. If left undefined, the `auth` parameterSTRING
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWnotion_client/__init__.py56__all__ = [CODE
LOW.github/scripts/monitor_notion_changelog.py14logger = logging.getLogger(__name__)CODE
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWREADME.md84 'person': {'email': 'avo@example.org'},CODE