Skip to main contentModule observe
Source - Route
- A route extracted from a FastAPI application.
- extract_assertion_referenced_imports
- Extract the set of import symbol names that appear (directly or via
variable chain) inside assertion nodes.
- extract_django_routes
- Extract Django URL conf routes from Python source code.
- extract_routes
- Extract FastAPI routes from Python source code.
- find_manage_py_root
- Search depth 1 and depth 2 subdirectories of
scan_root for a manage.py file. - is_non_sut_helper
- Determine if a file is a non-SUT helper (should be excluded from mapping).
- normalize_django_path
- Normalize a Django
path() URL pattern to Express-style :param notation.
"users/<int:pk>/" → "users/:pk/"
"users/<pk>/" → "users/:pk/" - normalize_re_path
- Normalize a Django
re_path() URL pattern.
Strips leading ^ / trailing $ anchors and converts (?P<name>...) to :name. - production_stem
- Extract stem from a production file path.
user.py -> Some("user")
_decoders.py -> Some("decoders") (leading _ stripped)
__init__.py -> None
test_user.py -> None - test_stem
- Extract stem from a test file path.
test_user.py -> Some("user")
user_test.py -> Some("user")
Other files -> None