SQL databases in Python, designed for simplicity, compatibility, and robustness.
This report summarizes scanner evidence for fastapi/sqlmodel, a Python project with 18,365 GitHub stars. SynthScan examined 37,976 lines of code across 446 source files, recording 241 pattern matches distributed across 8 syntactic categories. The legacy adjusted pattern signal is 4.6 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 89 finding(s).
Are imports declared and package/API names verified? 151 finding(s).
Are wrappers, guards, and repeated structures necessary? 77 finding(s).
Which changes need focused human review? 241 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 241 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_future_annotations.py | 1 | CODE | |
| LOW | …utorial/code_structure/tutorial002_py310/team_model.py | 6 | CODE | |
| LOW | …utorial/code_structure/tutorial002_py310/hero_model.py | 6 | CODE | |
| LOW | sqlmodel/__init__.py | 4 | CODE | |
| LOW | sqlmodel/__init__.py | 5 | CODE | |
| LOW | sqlmodel/__init__.py | 8 | CODE | |
| LOW | sqlmodel/__init__.py | 9 | CODE | |
| LOW | sqlmodel/__init__.py | 10 | CODE | |
| LOW | sqlmodel/__init__.py | 11 | CODE | |
| LOW | sqlmodel/__init__.py | 12 | CODE | |
| LOW | sqlmodel/__init__.py | 13 | CODE | |
| LOW | sqlmodel/__init__.py | 14 | CODE | |
| LOW | sqlmodel/__init__.py | 15 | CODE | |
| LOW | sqlmodel/__init__.py | 16 | CODE | |
| LOW | sqlmodel/__init__.py | 17 | CODE | |
| LOW | sqlmodel/__init__.py | 18 | CODE | |
| LOW | sqlmodel/__init__.py | 19 | CODE | |
| LOW | sqlmodel/__init__.py | 20 | CODE | |
| LOW | sqlmodel/__init__.py | 21 | CODE | |
| LOW | sqlmodel/__init__.py | 22 | CODE | |
| LOW | sqlmodel/__init__.py | 23 | CODE | |
| LOW | sqlmodel/__init__.py | 24 | CODE | |
| LOW | sqlmodel/__init__.py | 25 | CODE | |
| LOW | sqlmodel/__init__.py | 26 | CODE | |
| LOW | sqlmodel/__init__.py | 27 | CODE | |
| LOW | sqlmodel/__init__.py | 28 | CODE | |
| LOW | sqlmodel/__init__.py | 29 | CODE | |
| LOW | sqlmodel/__init__.py | 30 | CODE | |
| LOW | sqlmodel/__init__.py | 31 | CODE | |
| LOW | sqlmodel/__init__.py | 32 | CODE | |
| LOW | sqlmodel/__init__.py | 33 | CODE | |
| LOW | sqlmodel/__init__.py | 36 | CODE | |
| LOW | sqlmodel/__init__.py | 37 | CODE | |
| LOW | sqlmodel/__init__.py | 40 | CODE | |
| LOW | sqlmodel/__init__.py | 41 | CODE | |
| LOW | sqlmodel/__init__.py | 42 | CODE | |
| LOW | sqlmodel/__init__.py | 43 | CODE | |
| LOW | sqlmodel/__init__.py | 44 | CODE | |
| LOW | sqlmodel/__init__.py | 45 | CODE | |
| LOW | sqlmodel/__init__.py | 46 | CODE | |
| LOW | sqlmodel/__init__.py | 47 | CODE | |
| LOW | sqlmodel/__init__.py | 48 | CODE | |
| LOW | sqlmodel/__init__.py | 49 | CODE | |
| LOW | sqlmodel/__init__.py | 50 | CODE | |
| LOW | sqlmodel/__init__.py | 51 | CODE | |
| LOW | sqlmodel/__init__.py | 52 | CODE | |
| LOW | sqlmodel/__init__.py | 53 | CODE | |
| LOW | sqlmodel/__init__.py | 54 | CODE | |
| LOW | sqlmodel/__init__.py | 55 | CODE | |
| LOW | sqlmodel/__init__.py | 56 | CODE | |
| LOW | sqlmodel/__init__.py | 57 | CODE | |
| LOW | sqlmodel/__init__.py | 58 | CODE | |
| LOW | sqlmodel/__init__.py | 59 | CODE | |
| LOW | sqlmodel/__init__.py | 60 | CODE | |
| LOW | sqlmodel/__init__.py | 61 | CODE | |
| LOW | sqlmodel/__init__.py | 62 | CODE | |
| LOW | sqlmodel/__init__.py | 63 | CODE | |
| LOW | sqlmodel/__init__.py | 64 | CODE | |
| LOW | sqlmodel/__init__.py | 65 | CODE | |
| LOW | sqlmodel/__init__.py | 66 | CODE | |
| 90 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 78 | def get_testing_print_function( | CODE |
| LOW | tests/test_future_annotations.py | 9 | def test_model_with_future_annotations(database_engine: Engine): | CODE |
| LOW | tests/test_future_annotations.py | 37 | def test_model_with_string_annotations(database_engine: Engine): | CODE |
| LOW | tests/test_prepare_release.py | 42 | def test_update_version_file_requires_newer_version() -> None: | CODE |
| LOW | tests/test_prepare_release.py | 49 | def test_update_release_notes() -> None: | CODE |
| LOW | tests/test_prepare_release.py | 90 | def test_update_release_notes_rejects_existing_version() -> None: | STRING |
| LOW | tests/test_prepare_release.py | 104 | def test_get_release_notes_body_with_dated_heading() -> None: | STRING |
| LOW | tests/test_prepare_release.py | 133 | def test_get_release_notes_body_with_plain_heading() -> None: | STRING |
| LOW | tests/test_prepare_release.py | 171 | def test_get_release_notes_body_requires_version_section() -> None: | STRING |
| LOW | tests/test_prepare_release.py | 178 | def test_get_release_notes_body_requires_non_empty_section() -> None: | STRING |
| LOW | tests/test_prepare_release.py | 194 | def test_cli_updates_configured_files(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 230 | def test_cli_accepts_env_vars(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 250 | def test_cli_prints_current_version(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_prepare_release.py | 268 | def test_cli_prints_release_notes(tmp_path: Path) -> None: | STRING |
| LOW | tests/test_deprecations.py | 13 | def test_deprecated_from_orm_inheritance(): | CODE |
| LOW | tests/test_deprecations.py | 21 | def test_deprecated_parse_obj(): | CODE |
| LOW | tests/test_nullable.py | 83 | def test_non_nullable_optional_field_with_no_default_set(database_engine: Engine): | CODE |
| LOW | tests/test_nullable.py | 113 | def test_sqlite_nullable_primary_key(clear_sqlmodel, caplog): | CODE |
| LOW | tests/test_ondelete_raises.py | 7 | def test_ondelete_requires_nullable(clear_sqlmodel: Any) -> None: | CODE |
| LOW | tests/test_ondelete_raises.py | 29 | def test_ondelete_requires_foreign_key(clear_sqlmodel: Any) -> None: | CODE |
| LOW | tests/test_field_sa_args_kwargs.py | 49 | def test_sa_column_kwargs_type_raises(field_kwargs: dict[str, Any]) -> None: | CODE |
| LOW | tests/test_datetime.py | 75 | def test_inherited_annotated_datetime() -> None: | CODE |
| LOW | tests/test_datetime.py | 90 | def test_explicit_datetime_type( | CODE |
| LOW | tests/test_datetime.py | 106 | def test_explicit_datetime_type_class() -> None: | CODE |
| LOW | tests/test_datetime.py | 114 | def test_other_temporal_types() -> None: | CODE |
| LOW | tests/test_datetime.py | 139 | def test_datetime_column_types(dialect: Any, aware_type: str, naive_type: str) -> None: | CODE |
| LOW | tests/test_datetime.py | 200 | def test_naive_database_parameters( | CODE |
| LOW | tests/test_datetime.py | 228 | def test_sqlite_explicit_datetime_bypasses_utc_processing( | CODE |
| LOW | tests/test_datetime.py | 247 | def test_postgresql_datetime_processing() -> None: | CODE |
| LOW | tests/test_datetime.py | 271 | def test_postgresql_datetime_interval_arithmetic( | CODE |
| LOW | tests/test_datetime.py | 295 | def test_existing_sqlite_utc_data() -> None: | CODE |
| LOW | tests/test_datetime.py | 319 | def test_alembic_datetime_rendering() -> None: | CODE |
| LOW | tests/test_aliases.py | 29 | def test_create_with_field_name(model: type[PydanticUser] | type[SQLModelUser]): | CODE |
| LOW | tests/test_aliases.py | 35 | def test_create_with_field_name_with_config( | CODE |
| LOW | tests/test_aliases.py | 57 | def test_create_with_both_prefers_alias( | CODE |
| LOW | tests/test_aliases.py | 65 | def test_dict_default_uses_field_names( | CODE |
| LOW | tests/test_aliases.py | 76 | def test_dict_by_alias_uses_aliases( | CODE |
| LOW | tests/test_aliases.py | 105 | def test_create_with_validation_alias( | CODE |
| LOW | tests/test_aliases.py | 113 | def test_serialize_with_serialization_alias( | CODE |
| LOW | tests/test_field_sa_relationship.py | 6 | def test_sa_relationship_no_args() -> None: | CODE |
| LOW | tests/test_field_sa_relationship.py | 30 | def test_sa_relationship_no_kwargs() -> None: | CODE |
| LOW | tests/test_field_sa_column.py | 8 | def test_sa_column_takes_precedence() -> None: | CODE |
| LOW | tests/test_field_sa_column.py | 20 | def test_sa_column_with_annotated_metadata() -> None: | CODE |
| LOW | tests/test_field_sa_column.py | 31 | def test_sa_column_no_sa_args() -> None: | CODE |
| LOW | tests/test_field_sa_column.py | 42 | def test_sa_column_no_sa_kargs() -> None: | CODE |
| LOW | tests/test_field_sa_column.py | 64 | def test_sa_column_no_primary_key() -> None: | CODE |
| LOW | tests/test_field_sa_column.py | 75 | def test_sa_column_no_nullable() -> None: | CODE |
| LOW | tests/test_field_sa_column.py | 86 | def test_sa_column_no_foreign_key() -> None: | CODE |
| LOW | tests/test_field_sa_column.py | 124 | def test_sa_column_no_ondelete() -> None: | CODE |
| LOW | tests/test_main.py | 10 | def test_should_allow_duplicate_row_if_unique_constraint_is_not_passed( | CODE |
| LOW | tests/test_main.py | 42 | def test_should_allow_duplicate_row_if_unique_constraint_is_false( | CODE |
| LOW | tests/test_main.py | 74 | def test_should_raise_exception_when_try_to_duplicate_row_if_unique_constraint_is_true( | CODE |
| LOW | tests/test_main.py | 101 | def test_sa_relationship_property(database_engine: Engine): | CODE |
| LOW | tests/test_main.py | 135 | def test_composite_primary_key(database_engine: Engine): | CODE |
| LOW | tests/test_main.py | 161 | def test_composite_primary_key_and_validator(database_engine: Engine): | CODE |
| LOW | tests/test_main.py | 196 | def test_foreign_key_ondelete_with_annotated(database_engine: Engine): | CODE |
| LOW | tests/test_annotated_uuid.py | 7 | def test_annotated_optional_types(database_engine: Engine) -> None: | CODE |
| LOW | tests/test_instance_no_args.py | 7 | def test_allow_instantiation_without_arguments(database_engine: Engine): | CODE |
| LOW | tests/test_instance_no_args.py | 26 | def test_not_allow_instantiation_without_arguments_if_not_table(): | CODE |
| LOW | tests/test_pydantic/test_model_dump.py | 23 | def test_polymorphic_serialization( | CODE |
| 10 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 78 | CODE | |
| LOW | tests/conftest.py | 81 | CODE | |
| LOW | tests/test_datetime.py | 200 | CODE | |
| LOW | scripts/docs.py | 144 | CODE | |
| LOW | scripts/docs.py | 271 | CODE | |
| LOW | sqlmodel/_compat.py | 123 | CODE | |
| LOW | sqlmodel/_compat.py | 175 | CODE | |
| LOW | sqlmodel/_compat.py | 217 | CODE | |
| LOW | sqlmodel/main.py | 664 | CODE | |
| LOW | sqlmodel/main.py | 1024 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 75 | CODE | |
| LOW | sqlmodel/main.py | 242 | CODE | |
| LOW | sqlmodel/main.py | 291 | CODE | |
| LOW | sqlmodel/main.py | 349 | CODE | |
| LOW | sqlmodel/main.py | 388 | CODE | |
| LOW | sqlmodel/main.py | 929 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_select_typing.py | 61 | assert type(hero_4[2]) is str | COMMENT |
| LOW | sqlmodel/main.py | 861 | # added (e.g. when querying from DB) to the __fields_set__, this already exists | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_fields_set.py | 9 | email: str = "test@test.com" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/docs.py | 247 | def update_docs_includes_py39_to_py310() -> None: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/docs.py | 308 | # Check if the _an counterpart (or non-_an counterpart) is referenced. | STRING |