| |
- types.SimpleNamespace(builtins.object)
-
- DefaultNamespace
- _Logs(builtins.object)
-
- WindowsLogs
class DefaultNamespace(types.SimpleNamespace) |
|
DefaultNamespace(required: List[str] = [], optional: List[str] = [], default: dict = {}, types: dict = {})
This class build simple namespace with default
attributs. |
|
- Method resolution order:
- DefaultNamespace
- types.SimpleNamespace
- builtins.object
Methods defined here:
- __getitem__(self, key: str)
- Compatibility with dict.
- __init__(self, required: List[str] = [], optional: List[str] = [], default: dict = {}, types: dict = {})
- Initialize self. See help(type(self)) for accurate signature.
- build_types(self) -> None
- This function build type from configuration values.
- check_required(self) -> None
- This function checks required attributes
if one of required attributes is missing this
function raise MissingAttributesError.
- export_as_json(self, name: str = None) -> None
- This function export namespace values (useful for debugging).
- get(self, key: str, default=None)
- Compatibility with dict.
- get_dict(self) -> None
- This function return a dict of attributes.
- get_missings(self) -> List[str]
- This function checks required attributes
and return a List[str] of missing required attributes.
- get_unexpecteds(self, log: bool = True) -> List[str]
- This function return a List[str] of
all attributes not in optional and
required attributes.
If log argument is True a Warning log message is
write for all unexpected attributes.
- set_defaults(self) -> None
- This function set defaults attribut with defaults values.
- update(self, **kwargs)
- This function add/update attributes with **kwargs arguments.
Class methods defined here:
- default_build(**kwargs) -> ~DefaultNamespace from builtins.type
- Default build for DefaultNamespace (set defaults, add values, check
requirements and unexpected values and build types).
Data descriptors defined here:
- __weakref__
- list of weak references to the object (if defined)
Methods inherited from types.SimpleNamespace:
- __delattr__(self, name, /)
- Implement delattr(self, name).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __gt__(self, value, /)
- Return self>value.
- __le__(self, value, /)
- Return self<=value.
- __lt__(self, value, /)
- Return self<value.
- __ne__(self, value, /)
- Return self!=value.
- __reduce__(...)
- Return state information for pickling
- __repr__(self, /)
- Return repr(self).
- __setattr__(self, name, value, /)
- Implement setattr(self, name, value).
Static methods inherited from types.SimpleNamespace:
- __new__(*args, **kwargs) from builtins.type
- Create and return a new object. See help(type) for accurate signature.
Data descriptors inherited from types.SimpleNamespace:
- __dict__
Data and other attributes inherited from types.SimpleNamespace:
- __hash__ = None
|
Logs = class WindowsLogs(_Logs) |
|
This class log on Windows. |
|
- Method resolution order:
- WindowsLogs
- _Logs
- builtins.object
Methods defined here:
- critical(log: str) -> None
- This function log criticals on Windows.
- debug(log: str) -> None
- This function log debugs on Windows.
- error(log: str) -> None
- This function log errors on Windows.
- info(log: str) -> None
- This function log infos on Windows.
- warning(log: str) -> None
- This function log warnings on Windows.
Data and other attributes defined here:
- __annotations__ = {'app': <class 'str'>}
- app = 'WebScripts'
Methods inherited from _Logs:
- config(*args, **kwargs)
- This function config ROOT logger.
- exception(log: str) -> None
- This function implement basic python exception (error) logs for WebScripts.
- trace(log: str) -> None
- This function implement trace logs for WebScripts.
Data descriptors inherited from _Logs:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes inherited from _Logs:
- console = <Logger WebScripts.console (NOTSET)>
- file = <Logger WebScripts.file (NOTSET)>
- log_critical = <Logger WebScripts.critical (CRITICAL)>
- log_debug = <Logger WebScripts.debug (DEBUG)>
- log_error = <Logger WebScripts.error (ERROR)>
- log_info = <Logger WebScripts.info (INFO)>
- log_trace = <Logger WebScripts.trace (NOTSET)>
- log_warning = <Logger WebScripts.warning (WARNING)>
| |