mlox.config

@dataclass
class BuildConfig:
BuildConfig(class_name: str, params: Optional[Dict[str, Any]] = <factory>)
class_name: str
params: Optional[Dict[str, Any]]
@dataclass
class ServiceConfig:
ServiceConfig( id: str, name: str, version: str | float | int, maintainer: str, description: str, description_short: str, links: Dict[str, str], build: BuildConfig, groups: Dict[str, Any] = <factory>, ui: Dict[str, str] = <factory>, requirements: Dict[str, float] = <factory>, ports: Dict[str, int] = <factory>)
id: str
name: str
version: str | float | int
maintainer: str
description: str
description_short: str
build: BuildConfig
groups: Dict[str, Any]
ui: Dict[str, str]
requirements: Dict[str, float]
ports: Dict[str, int]
path: str = ''
def instantiate_ui(self, func_name: str) -> Optional[Callable]:
def instantiate_server(self, params: Dict[str, Any]) -> mlox.server.AbstractServer | None:
def instantiate_service(self, params: Dict[str, Any]) -> mlox.service.AbstractService | None:
def instantiate_build( self, params: Dict[str, Any]) -> mlox.server.AbstractServer | mlox.service.AbstractService | None:
def get_stacks_path(prefix: Literal['mlox', 'mlox-server'] = 'mlox') -> str:

Return the on-disk path for bundled configuration assets.

Service configurations now live alongside their implementation modules under mlox.services while server configurations are colocated within mlox.servers. This helper keeps backward compatibility with the previous single "stacks" directory by routing calls based on the configuration prefix.

def load_service_config_by_id(service_id: str) -> ServiceConfig | None:
def load_all_server_configs() -> List[ServiceConfig]:
def load_all_service_configs( prefix: Literal['mlox', 'mlox-server'] = 'mlox') -> List[ServiceConfig]:
def load_service_configs( root_dir: str, service_dir: str, prefix: Literal['mlox', 'mlox-server']) -> List[ServiceConfig]:

Loads service configurations from YAML files in the given directory.

def load_config( root_dir: str, service_dir: str, candidate: str) -> ServiceConfig | None:
def resource_files():