Flask
PythonLightweight WSGI web framework for Python
Flask's core package is one import cycle of 20 modules, and the analyzer's import graph for the package matches an independent parse of every import exactly. Most of that cycle never executes at import time.
Call resolution (4,008 call sites)
- Resolved in the repository
- 1,348
- To libraries or the standard library
- 1,012
- Ambiguous (several possible targets)
- 958
- Unresolved (could be repo code)
- 690
The rate above is resolved ÷ (resolved + ambiguous + unresolved). Calls to libraries and the standard library cannot reach this repository, so they are shown separately and left out of it. Test code is included in these counts.
What the analysis shows
An independent parse of every import statement in src/flask (Python's ast module) finds 95 internal import relations and the same 20-module cycle. The analyzer's import graph for the package matches it exactly: none missing, none extra.
The package's __init__.py re-exports names (from .app import Flask as Flask); the analyzer records 11 such re-export imports. With them the cycle runs through __init__.py, json/__init__.py and json/tag.py.
Most of the cycle runs through imports inside if TYPE_CHECKING: blocks or inside functions. Without the type-checking imports the source's cycle has 11 modules, and the imports Python executes at module load form no cycle at all. The analyzer reports its runtime cycle as 20 modules, equal to the full one.
examples/javascript/js_example/__init__.py imports views after creating the app, and views.py imports app back: the circular-import pattern Flask's documentation describes for packaging an application.
The analyzer identifies 37 Flask route handlers with their HTTP method and path, 23 pytest fixtures and 3 Celery tasks, all with exact status.
4,008 call sites were analyzed; 34% resolve to a function inside the repository. The most widely called symbol is Flask itself (called from 26 files), followed by Scaffold.route. app.py imports 12 modules and is imported by 34.
Re-analyzed with the current analyzer, the same commit gives the same files, module dependencies and cycles as the October demo (83 files, 231 module dependencies, 2 cycle groups). More calls resolve: 1,348 inside the repository, against 1,341 in October. The additional calls go through parameters with a type annotation and through super(). The analysis took 8.4 s with a peak of 63 MB (October: 7.2 s, 79 MB).
Largest cycle group
- src/flask/__init__.py
- src/flask/app.py
- src/flask/blueprints.py
- src/flask/cli.py
- src/flask/config.py
- src/flask/ctx.py
- src/flask/debughelpers.py
- src/flask/globals.py
- src/flask/helpers.py
- src/flask/json/__init__.py
- src/flask/json/provider.py
- src/flask/json/tag.py
- src/flask/logging.py
- src/flask/sansio/app.py
- src/flask/sansio/blueprints.py
- src/flask/sansio/scaffold.py
- src/flask/sessions.py
- src/flask/templating.py
- src/flask/testing.py
- src/flask/wrappers.py
Most widely called symbols (calling files)
- src/flask/app.py#Flask (26)
- src/flask/sansio/scaffold.py#Scaffold.route (16)
- src/flask/blueprints.py#Blueprint (11)
- src/flask/helpers.py#url_for (10)
- src/flask/templating.py#render_template (10)
- src/flask/app.py#Flask.test_client (9)
Endpoints (first rows of the inventory)
- POST /add -> examples/celery/src/task_app/views.py#add
- POST /block -> examples/celery/src/task_app/views.py#block
- POST /process -> examples/celery/src/task_app/views.py#process
- GET /result/<id> -> examples/celery/src/task_app/views.py#result
- GET /login -> examples/tutorial/flaskr/auth.py#login
- POST /login -> examples/tutorial/flaskr/auth.py#login
- GET /logout -> examples/tutorial/flaskr/auth.py#logout
- GET /register -> examples/tutorial/flaskr/auth.py#register
8 of 37 shown
Compared with the October 2026 demo
The same commit, analyzed again with the current analyzer. Both columns use the same definitions; differences come from analyzer changes, explained in the findings above where they matter. The October demo recorded only the resolved-call count, so the other call-resolution rows show the current analyzer only.
| Measure | October 2026 demo | Current analyzer |
|---|---|---|
Files analyzed graph nodes (Go: packages) | 83 | 83 |
Source lines (SLOC) non-blank, non-comment lines of analyzed files | 10,496 | 10,496 |
Module dependencies distinct file-to-file links, test-only and name-match links excluded | 231 | 231 |
Relationship records all edge rows of every kind, including links to external symbols | 272 | 272 |
Cycle groups groups of files that depend on each other | 2 | 2 |
Largest cycle (files) size of the largest cycle group | 20 | 20 |
Most-imported module distinct production importers of the top module | 44 (__init__.py) | 44 (__init__.py) |
Call sites resolved in repo calls resolved to a function inside the repository / all call sites | 1,341 / 4,008 | 1,348 / 4,008 |
Calls to libraries (external) calls into other packages or the language's standard library | n/a | 1,012 |
Ambiguous calls calls with several possible targets inside the repository | n/a | 958 |
Unresolved calls calls that could reach repository code but were not pinned to a target | n/a | 690 |
Resolved of in-repo calls resolved / (resolved + ambiguous + unresolved): external calls cannot reach the repository | n/a | 45% |
Framework registrations routes, handlers, hooks, entry points with resolution status | 63 | 63 |
Architectural zones package-hierarchy zones | 21 | 21 |
Analysis time (s) wall time of the analysis call | 7.2 | 8.4 |
Peak memory (MB) container memory peak during the analysis | 79 | 63 |
Limitations
- The analyzer does not separate
TYPE_CHECKING-only imports in this repository, so the reported runtime cycle equals the full cycle. - 17% of call sites stay unresolved and 24% ambiguous, mostly calls on complex receivers and names shadowed by local variables.
- Static analysis records relationships visible in the source. It does not see dynamic loading, reflection, or behaviour at runtime; verify important conclusions in the code.
Download the analysis
A full bundle of a large repository exceeds many models' context windows; the focused slices below answer one question each in a fraction of the size.
Focused slices
Every cycle group with its members and size.
scc-summary
The most depended-on and most dependent files, with the reasons they rank high.
hub-summary
Everything that depends on the main hub, two levels deep.
blast-radius
Test-side callers reachable from the most-called symbol (see limitations).
affected-tests
Detected frameworks and how their registrations were resolved.
framework-summary
Routes and handlers, with method, path and target.
framework-inventory
Resolved calls to the most-called symbol, with call sites.
call-diagnostics
Ready to run this on your own codebase?
Hosted analyses use the same analyzer as this demo, within your usage limits.