Cat Feeder  1.0.0
The Cat feeder project
Loading...
Searching...
No Matches
backend.src.libs.config.toml_loader Namespace Reference

Data Structures

class  TOMLLoader
 

Functions

Dict[str, Any] load_config ()
 
Any get_config (*str keys, Any default=None)
 
Path get_project_root ()
 
bool refresh_debug (bool debug_mode_default=False)
 

Variables

EnvLoader _EI = EnvLoader()
 

Detailed Description

# +==== BEGIN CatFeeder =================+
# LOGO:
# ..............(..../\
# ...............)..(.')
# ..............(../..)
# ...............\‍(__)|
# Inspired by Joan Stark
# source https://www.asciiart.eu/
# animals/cats
# /STOP
# PROJECT: CatFeeder
# FILE: toml_loader.py
# CREATION DATE: 04-12-2025
# LAST Modified: 22:14:17 14-01-2026
# DESCRIPTION:
# This is the backend server in charge of making the actual website work.
# /STOP
# COPYRIGHT: (c) Cat Feeder
# PURPOSE: Centralized configuration management with intelligent path discovery
# // AR
# +==== END CatFeeder =================+

Function Documentation

◆ get_config()

Any backend.src.libs.config.toml_loader.get_config ( *str keys,
Any default = None )
Get config.toml value using nested keys.

Args:
    *keys: Nested keys to traverse (e.g., 'database', 'host')
    default: Default value if key not found (default: None)

Returns:
    Value at specified key path or default if not found

Definition at line 400 of file toml_loader.py.

◆ get_project_root()

Path backend.src.libs.config.toml_loader.get_project_root ( )
Get the project root directory.

Definition at line 415 of file toml_loader.py.

◆ load_config()

Dict[str, Any] backend.src.libs.config.toml_loader.load_config ( )
Load config.toml (cached).

Returns:
    Dictionary containing parsed TOML configuration

Raises:
    FileNotFoundError: If config.toml not found

Definition at line 386 of file toml_loader.py.

◆ refresh_debug()

bool backend.src.libs.config.toml_loader.refresh_debug ( bool debug_mode_default = False)
Refresh the debug status from environment variable.

Definition at line 421 of file toml_loader.py.

Variable Documentation

◆ _EI

EnvLoader backend.src.libs.config.toml_loader._EI = EnvLoader()
protected

Definition at line 47 of file toml_loader.py.