Add profile-driven feature runtime utilities

- Add feature_registry.py with FeatureGroup definitions for core, podcast, youtube, content_planning
- Add feature_profiles.py to parse ALWRITY_FEATURE_TO_ENABLE env var
- Add feature_runtime.py with is_enabled(), get_enabled_routers() helpers
- Fix syntax error in __init__.py (duplicate OnboardingManager)

Enables feature toggles via ALWRITY_FEATURE_TO_ENABLE environment variable.
This commit is contained in:
ajaysi
2026-03-31 15:04:05 +05:30
parent bf980ab89b
commit 5ac1b9439d
4 changed files with 226 additions and 1 deletions

View File

@@ -12,6 +12,14 @@ from .rate_limiter import RateLimiter
from .frontend_serving import FrontendServing
from .router_manager import RouterManager
from .onboarding_manager import OnboardingManager
from .feature_runtime import (
get_active_profiles,
get_enabled_groups,
get_enabled_optional_services,
get_enabled_routers,
get_enabled_startup_hooks,
is_enabled,
)
__all__ = [
'DependencyManager',
@@ -22,5 +30,11 @@ __all__ = [
'RateLimiter',
'FrontendServing',
'RouterManager',
'OnboardingManager'
'OnboardingManager',
'get_active_profiles',
'get_enabled_groups',
'get_enabled_optional_services',
'get_enabled_routers',
'get_enabled_startup_hooks',
'is_enabled'
]