tisserande.tracking
Submodules
Attributes
Functions
|
Configure the tracking system. |
|
Decorator to track execution provenance of a sync function. |
|
Decorator to track execution provenance of an async function. |
|
Execute and track a shell command. |
Package Contents
- tisserande.tracking.configure(*, backend: tisserande.tracking.backends.TrackingBackend | None = None, db_url: str | None = None) None[source]
Configure the tracking system.
Must be called before @track is used (unless a backend is passed directly to the decorator). If neither backend nor db_url is provided, creates a LocalSyncBackend with the default DB URL from config.
- tisserande.tracking.track(func: F) F[source]
- tisserande.tracking.track(*, backend: tisserande.tracking.backends.TrackingBackend | None = None, track_inputs: bool = True, track_outputs: bool = True) collections.abc.Callable[[F], F]
Decorator to track execution provenance of a sync function.
- Can be used with or without arguments:
@track def my_func(…): …
@track(track_outputs=False) def my_func(…): …
- tisserande.tracking.track_async(func: F) F[source]
- tisserande.tracking.track_async(*, backend: tisserande.tracking.backends.TrackingBackend | None = None, track_inputs: bool = True, track_outputs: bool = True) collections.abc.Callable[[F], F]
Decorator to track execution provenance of an async function.
- tisserande.tracking.track_shell(command: str | list[str], *, inputs: dict[str, Any] | None = None, outputs: dict[str, Any] | None = None, backend: tisserande.tracking.backends.TrackingBackend | None = None) subprocess.CompletedProcess[str][source]
Execute and track a shell command.
- Parameters:
command – Shell command to execute
inputs – Dict mapping arg names to values (tracked as input data nodes)
outputs – Dict mapping output names to values (tracked as output data nodes)