basetool¶
Base Classes¶
Author: Jacek ‘Szumak’ Kotlarski –<szumak@virthost.pl> Created: 2024-01-15
Purpose: Deliver lightweight base classes with runtime metadata helpers.
Provides mixins that expose convenience properties for class and method names, supporting logging contexts and debugging aids in derived classes.
- class jsktoolbox.basetool.classes.BClasses[source]¶
Bases:
NoDynamicAttributesBase mixin exposing class and frame metadata helpers.
Data Structures¶
Author: Jacek ‘Szumak’ Kotlarski –<szumak@virthost.pl> Created: 2024-01-15
Purpose: Provide a typed container mixin with helper accessors.
BData ensures subclasses can manage internal dictionaries with optional type constraints, reliable copying, and lifecycle utilities for managed state.
Logging¶
Author: Jacek ‘Szumak’ Kotlarski –<szumak@virthost.pl> Created: 2024-01-15
Purpose: Provide foundational mixins for the logging subsystem.
Defines base mixins for logger queues, engine metadata, and formatting behaviour leveraged by higher-level logging utilities.
- class jsktoolbox.basetool.logs.BLoggerQueue[source]¶
Bases:
BDataBase mixin that exposes a lazily-created logging queue.
- property logs_queue: LoggerQueue | None¶
Return the configured logging queue instance.
### Returns: [Optional[LoggerQueue]] - Logger queue or None when not set.
- class jsktoolbox.basetool.logs.BLoggerEngine[source]¶
Bases:
BDataBase mixin for logger engine metadata.
- class jsktoolbox.basetool.logs.BLogFormatter[source]¶
Bases:
NoDynamicAttributesBase mixin for log formatters leveraging simple templates.
- __setattr__(name, value)¶
Prevent dynamic attribute assignment on instances.
### Raises: * AttributeError: Attribute not previously declared.
Threading¶
Author: Jacek ‘Szumak’ Kotlarski –<szumak@virthost.pl> Created: 2024-01-15
Purpose: Offer foundational helpers for thread-based utilities.
Provides attribute containers mirroring threading.Thread internals so custom thread implementations can share consistent state management behaviour.
- class jsktoolbox.basetool.threads.ThBaseObject[source]¶
Bases:
BDataBase mixin mirroring attributes of threading.Thread.
- __setattr__(name, value)¶
Prevent dynamic attribute assignment on instances.
### Raises: * AttributeError: Attribute not previously declared.
- property sleep_period: float¶
Return configured sleep period in seconds.
### Returns: [float] - Sleep interval value.