src.backend.lib.config.Config(3)

NAME
src.backend.lib.config.Config

SYNOPSIS

Inherited by src.backend.tests.library_test.Test_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

  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

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

Instantiate logging system.

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

  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

  src.backend.lib.config.Config._cp [protected]

  src.backend.lib.config.Config._data [protected]

  src.backend.lib.config.Config._fp [protected]

  src.backend.lib.config.Config.allowed_hosts

  src.backend.lib.config.Config.auto_scan

  src.backend.lib.config.Config.book_path

  src.backend.lib.config.Config.book_shelf

  src.backend.lib.config.Config.build_mode

  src.backend.lib.config.Config.catalogue_db

  src.backend.lib.config.Config.config_structure

  src.backend.lib.config.Config.db_engine

  src.backend.lib.config.Config.db_host

  src.backend.lib.config.Config.db_pass

  src.backend.lib.config.Config.db_port

  src.backend.lib.config.Config.db_user

  src.backend.lib.config.Config.file_array

  src.backend.lib.config.Config.logger

  src.backend.lib.config.Config.password

  src.backend.lib.config.Config.root

  src.backend.lib.config.Config.TITLE

  src.backend.lib.config.Config.user

  src.backend.lib.config.Config.VERSION

Author

Generated automatically by Doxygen for pyShelf Open Source Ebook Server from the source code.