def versioned(
    value: Any,
    version: Union[int, str] = 0,
    versions: Optional[Dict[Union[int, str], Any]] = None,
    name: Optional[str] = None,
) -> Versioned:

source code

Thinly wrap input value into unify.Versioned class, such that it includes version information.

Arguments:

  • value - The value to wrap with attached version information.
  • version - The version associated with this value.
  • versions - Dictionary of versions to store in the instance
  • name - The name of the entry being versioned.

Returns:

A unify.Versioned instance of the input value.