Functions¶
-
statey.
f
(template: str, scope: Optional[Dict[str, Any]] = None) → statey.syms.object_.Object¶ Interpolation operator for objects
-
statey.
ifnull
(obj: statey.syms.object_.Object, otherwise: Any) → statey.syms.object_.Object¶ If the object is None, substitute the value from the other object
-
statey.
join
(head: statey.syms.object_.Object, *tail: Sequence[Any]) → statey.syms.object_.Object¶ Pass all of the given argument to a symbolic function that will just return the first element, but the result will depend on all of the additional arguments symbolically as well
-
statey.
struct
(*args: Sequence[Tuple[str, Any]], **kwargs: Dict[str, Any]) → statey.syms.object_.Object¶ Utility for simply create struct objects
-
statey.
function
(func: Callable[[Any], Any], type: statey.syms.types.Type = MISSING, registry: Registry = MISSING) → statey.syms.func.Function¶ Construct a Function object for a regular python function
-
statey.
F
= _FunctionFactory(annotation=MISSING)¶ An interface for creating function call objects
-
statey.
map
(func: Callable[[Any], Any], value: Any, return_type: statey.syms.types.Type = MISSING) → Any¶ Apply the function to the given object. If it is an object, convert func to a native function and apply it to the object’s underlying value
-
statey.
declarative
(func: Callable[[Any], Any] = MISSING, name_key: Callable[[str], str] = <function <lambda>>, ignore: Callable[[str], bool] = <function <lambda>>) → Callable[[Any], Any]¶ Wrap the given function as a function that declares statey objects.
-
statey.
struct_replace
(obj: statey.syms.object_.Object, keep_type=True, **kwargs: Dict[str, Any]) → statey.syms.object_.Object¶ Replace the given attributes in object
-
statey.
fill
(obj: statey.syms.object_.Object, output_type: statey.syms.types.StructType, get_value: Callable[[str], Any]) → statey.syms.object_.Object¶ Convert obj to output_type by filling missing fields with values resolved from get_value
-
statey.
fill_unknowns
(obj: statey.syms.object_.Object, output_type: statey.syms.types.StructType) → statey.syms.object_.Object¶ Convert obj to output_type by filling missing values with unknowns
-
statey.
filter_struct
(obj: statey.syms.object_.Object, output_type: statey.syms.types.StructType)¶ fill() which will raise an error if any exist that appears in output_type doesn’t appear in obj
-
statey.
struct_drop
(obj: Union[statey.syms.object_.Object, statey.syms.types.Type], *fields: str) → statey.syms.object_.Object¶ Drop the fields with the given names from obj
-
statey.
struct_add
(obj: Union[statey.syms.object_.Object, statey.syms.types.Type], *fields: Sequence[Tuple[str, Any, statey.syms.types.Type]]) → statey.syms.object_.Object¶ Add the given fields to obj
-
statey.
struct_interpolate
(obj: statey.syms.object_.Object, new_values: Dict[str, Any], keep_type: bool = True, path_parser: Optional[statey.syms.path.PathParser] = None) → statey.syms.object_.Object¶ Extend struct_interpolate_one to allow providing a dictionary of new values
-
statey.
str
(input: Any) → statey.syms.object_.Object¶
-
statey.
int
(input: Any) → statey.syms.object_.Object¶