RepoPilot

tiangolo / sqlmodel

Search tiangolo/sqlmodel

GitHub

Code

How tiangolo/sqlmodel is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely public API
  5. Likely start-up file
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a new SQLModel with relationships

  • Import and use the model in session queries via sqlmodel.orm.session.Session.

Extend async database operations

  • Use sqlmodel.ext.asyncio.AsyncSession instead of sqlmodel.orm.session.Session.
  • Wrap session operations in async with blocks and await query execution.
  • Test async flows in tests/test_advanced/ following async pytest patterns.

Support a new Python type or SQL column type

  • Add custom type class to sqlmodel/sql/sqltypes.py extending SQLAlchemy TypeDecorator.
  • Update sqlmodel/_compat.py if compatibility with older SQLAlchemy/Pydantic versions needed.

Add documentation for a feature

  • Write corresponding markdown in docs/tutorial/ or docs/advanced/ with code references.
  • Update mkdocs.yml navigation if adding new documentation sections.

Change the public API

Trace runtime behavior

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.

Code quality and hotspots

Largest source files

  • Branch points9 per file on average
  • Code issues1 error, 5 warnings
  • Largest file1,051 lines
  • Hotspot load0 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions15 workflows
  • Tests171 test filesPytest · 1.0 test files per source file (file count, not coverage)
  • Dependency updatesDependabot

Test folders: tests · docs_src/tutorial/fastapi/app_testing/tutorial001_py310 · tests/test_advanced/test_datetime

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.