simplefancontroller package

Subpackages

Submodules

simplefancontroller.log module

simplefancontroller.log.start_logger(level: Union[int, str] = 20) Logger

Initializes a RotatingFileHanlder and a StreamHandler for logging. This function creates a logger with two handlers (RotatingFileHandler and StreamHandler) that can come in handy, if no other logging handlers are being used. The RotatingFileHandler writes it’s output to ‘oopnet.log’ and rotates the file when it reaches a size of 5 MB. :param level: logging level (e.g., logging.DEBUG)

Returns

logger object

simplefancontroller.main module

simplefancontroller.settings module

class simplefancontroller.settings.SFCAPIConfig(secret: str = 'MaCZ4m5I6LLce7-eaVFqEuj1VDPqayeiF2mDVJjPVtc', algorithm: str = 'HS256', ttl: int = 600, db_user_file: str = 'sfc_users.db', db_data_file: str = 'sfc_data.db', db_user_table: str = 'USERS', db_fan_table: str = 'FANS', db_persistence_table: str = 'PERSISTENCE', db_settings_table: str = 'SETTINGS')

Bases: object

algorithm: str = 'HS256'
db_data_file: str = 'sfc_data.db'
db_fan_table: str = 'FANS'
db_persistence_table: str = 'PERSISTENCE'
db_settings_table: str = 'SETTINGS'
db_user_file: str = 'sfc_users.db'
db_user_table: str = 'USERS'
secret: str = 'MaCZ4m5I6LLce7-eaVFqEuj1VDPqayeiF2mDVJjPVtc'
ttl: int = 600

Module contents