Results — yaflux documentation

Skip to main content
`Ctrl`+`K`

# Results

exception yaflux._results.FlagError

  Bases: `Exception`

  Raised when attempting to modify a flag that has already been set.

class yaflux._results.FlagLock

  Bases: `ThreadSafeLock`

  Context manager for controlling flag mutation.

  Methods

  `allow_mutation`() | Context manager for allowing mutation.
  `can_mutate`() | Check if the current thread is allowed to mutate.

class yaflux._results.Results

  Bases: `object`

  Dynamic container for analysis results.

  _data

    The results data. Indexed by the creates items in the step definition.

    Type:

      dict[str, Any]

  _metadata

    The metadata for each result. Indexed by the step name.

    Type:

      dict[str, Metadata]

  Methods

  `get_step_metadata`(step_name) | Get the metadata for a result.
  `get_step_results`(step_name) | Get the results for a step.
  `set_metadata`(step_name, metadata) | Set the metadata for a result.

  get_step_metadata(step_name)

    Get the metadata for a result.

    Return type:

      `Metadata`

  get_step_results(step_name)

    Get the results for a step.

    Return type:

      `dict`[`str`, `Any`]

  set_metadata(step_name, metadata)

    Set the metadata for a result.

class yaflux._results.ResultsLock

  Bases: `ThreadSafeLock`

  Context manager for controlling results mutation.

  Methods

  `allow_mutation`() | Context manager for allowing mutation.
  `can_mutate`() | Check if the current thread is allowed to mutate.

exception yaflux._results.UnauthorizedMutationError

  Bases: `Exception`

  Raised when attempting to modify results outside of a step decorator.