reload_config_base.py


Overview

reload_config_base.py defines a foundational class ReloadConfigBase designed to serve as a base for configuration management within the InfiniFlow project. This class provides utility class methods to access configuration parameters declared as class attributes in subclasses, allowing retrieval of all configurations or specific ones by name.

The main functionality includes:

This base class facilitates a consistent and straightforward interface for managing reloadable configurations across different components or modules in the system.


Class Details

Class: ReloadConfigBase

ReloadConfigBase is intended as a superclass for configuration containers. It does not define any configuration parameters itself but provides two key class methods for accessing subclass configurations.

Methods


get_all()

@classmethod
def get_all(cls) -> dict:

Returns a dictionary of all configuration entries defined as class attributes on the subclass.


get(config_name)

@classmethod
def get(cls, config_name: str):

Fetches the value of a specific configuration parameter by name.


Implementation Details and Algorithms


Interaction with Other Parts of the System


Diagram: Class Structure of ReloadConfigBase

classDiagram
    class ReloadConfigBase {
        <<abstract>>
        +get_all() dict
        +get(config_name: str)
    }

Summary

reload_config_base.py provides a lightweight base class for configuration management using class attributes. It simplifies retrieving all or specific configuration values defined in subclasses while filtering out private or callable attributes. This utility supports clean configuration access patterns across the InfiniFlow project components.