woger.base_path_structure module¶
-
class
woger.base_path_structure.
BasePathStructure
(root: str, *, data=None)[source]¶ Bases:
object
Base class for the path structure
-
track
(action: str) → woger.action_tracker.ActionTracker[source]¶ Creates an ActionTracker object and targets action action
It’s a shortcut which creates an ActionTracker for you
..code-block:: python
>>> from woger import BasePathStructure >>> >>> class PathStructure(BasePathStructure): ... json = 'json' >>> >>> ps = PathStructure('root') >>> >>> # WRONG >>> tracker = ActionTracker('load_json', 'root/state.json', ps.json) >>> >>> # RIGHT >>> tracker = ps.track(ps.json.action())
Parameters: action (str) – Action to track Returns: Return type: ActionTracker instance
-