src.backend.lib.config.Config Class Reference
Inheritance diagram for src.backend.lib.config.Config:

## Public Member Functions

def | __init__ (self, root)
def | init_config (self)
def | get_logger (self)
def | open_file (self)

## Public Attributes

| root
| config_structure
| logger
| book_path
| TITLE
| VERSION
| book_shelf
| catalogue_db
| user
| password
| db_host
| db_port
| file_array
| auto_scan
| allowed_hosts
| db_engine
| db_user
| db_pass
| build_mode

## Protected Attributes

| _fp
| _cp
| _data

## Detailed Description

    Main System Configuration.

    >>> config = Config(root)

    Parameters
    ----------
    root : File system root of program

    Attributes
    ----------
    root : str() stores root.
    config_structure : dict() Default Configuration Structure.
    _fp : str() file pointer to main configuration.
    _cp : Path() object of configuration file.
    _data : dict() parsed json of _fp.
    logger : holds logging configuration from get_logger().
    book_path : directory pointer to main books folder.
    TITLE : str() Program title.
    VERSION : str() Program  version.
    TITLE : str() Combines TITLE & VERSION.
    book_shelf : Deprecation TODO: Is this still in use?
    catalogue_db : str() Database Name.
    user : str() Database user name.
    password : str() Database password.
    db_host : str() Database host.
    db_port : int() Database port.
    file_array : list() copy of book_shelf TODO: See book_shelf
    auto_scan: bool() Do we auto scan on launch?
    allowed_hosts : list() Allowed host list.
    db_engine : str() Desired database engine type.
    db_user : str() Database user name. Duplication Warning.
    db_pass : str() Database password. Duplication Warning.
    build_mode : str() Production | Development mode.

    Methods
    -------
    get_logger : Setup loguru.
    open_file : Parse configuration file.

## Constructor & Destructor Documentation

## __init__()

def src.backend.lib.config.Config.__init__ | ( |  | self,
|  |  | root
| ) |  |

    Initialize main configuration options.

Reimplemented in src.backend.tests.library_test.Test_Config.

## Member Function Documentation

## get_logger()

def src.backend.lib.config.Config.get_logger | ( |  | self | ) |

    Instantiate logging system.

## init_config()

def src.backend.lib.config.Config.init_config | ( |  | self | ) |

## open_file()

def src.backend.lib.config.Config.open_file | ( |  | self | ) |

    Open config.json and reads in configuration options.

Reimplemented in src.backend.tests.library_test.Test_Config.

## Member Data Documentation

## _cp

src.backend.lib.config.Config._cp

protected

## _data

src.backend.lib.config.Config._data

protected

## _fp

src.backend.lib.config.Config._fp

protected

## allowed_hosts

src.backend.lib.config.Config.allowed_hosts

## auto_scan

src.backend.lib.config.Config.auto_scan

## book_path

src.backend.lib.config.Config.book_path

## book_shelf

src.backend.lib.config.Config.book_shelf

## build_mode

src.backend.lib.config.Config.build_mode

## catalogue_db

src.backend.lib.config.Config.catalogue_db

## config_structure

src.backend.lib.config.Config.config_structure

## db_engine

src.backend.lib.config.Config.db_engine

## db_host

src.backend.lib.config.Config.db_host

## db_pass

src.backend.lib.config.Config.db_pass

## db_port

src.backend.lib.config.Config.db_port

## db_user

src.backend.lib.config.Config.db_user

## file_array

src.backend.lib.config.Config.file_array

## logger

src.backend.lib.config.Config.logger

## password

src.backend.lib.config.Config.password

## root

src.backend.lib.config.Config.root

## TITLE

src.backend.lib.config.Config.TITLE

## user

src.backend.lib.config.Config.user

## VERSION

src.backend.lib.config.Config.VERSION

The documentation for this class was generated from the following file:

- src/backend/lib/config.py