MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / _get_db_classes

Function _get_db_classes

server/routers/features.py:37–49  ·  view source on GitHub ↗

Lazy import of database classes.

()

Source from the content-addressed store, hash-verified

35
36
37def _get_db_classes():
38 """Lazy import of database classes."""
39 global _create_database, _Feature
40 if _create_database is None:
41 import sys
42 from pathlib import Path
43 root = Path(__file__).parent.parent.parent
44 if str(root) not in sys.path:
45 sys.path.insert(0, str(root))
46 from api.database import Feature, create_database
47 _create_database = create_database
48 _Feature = Feature
49 return _create_database, _Feature
50
51
52router = APIRouter(prefix="/api/projects/{project_name}/features", tags=["features"])

Callers 12

get_db_sessionFunction · 0.85
list_featuresFunction · 0.85
create_featureFunction · 0.85
create_features_bulkFunction · 0.85
get_dependency_graphFunction · 0.85
get_featureFunction · 0.85
update_featureFunction · 0.85
delete_featureFunction · 0.85
skip_featureFunction · 0.85
add_dependencyFunction · 0.85
remove_dependencyFunction · 0.85
set_dependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected