Type Aliases¶
Type convenience references for consistent type hints across xpytools.
Generic Type Variables¶
xpytools.xtype.common.T
module-attribute
¶
Generic type variable for arbitrary data type.
xpytools.xtype.common.K
module-attribute
¶
Type variable for dictionary keys.
xpytools.xtype.common.V
module-attribute
¶
Type variable for dictionary values.
String and Path Types¶
xpytools.xtype.common.PathLike
module-attribute
¶
Type alias for file system paths — accepts str or pathlib.Path.
xpytools.xtype.common.OptPath
module-attribute
¶
Optional path type that may be None.
xpytools.xtype.common.OptStr
module-attribute
¶
Optional string type that may be None.
Collection Shortcuts¶
xpytools.xtype.common.DictStrAny
module-attribute
¶
Dictionary with string keys and any values.
xpytools.xtype.common.DictAny
module-attribute
¶
Dictionary with arbitrary key and value types.
xpytools.xtype.common.DictStrStr
module-attribute
¶
Dictionary with string keys and string values.
xpytools.xtype.common.DictStrT
module-attribute
¶
Generic dictionary mapping strings to type T.
xpytools.xtype.common.ListAny
module-attribute
¶
List of arbitrary objects.
xpytools.xtype.common.TupleStr
module-attribute
¶
Tuple containing only strings.
xpytools.xtype.common.IterableStr
module-attribute
¶
Iterable that yields strings.
xpytools.xtype.common.SequenceStr
module-attribute
¶
Sequence (list, tuple, etc.) of strings.
Callable Types¶
xpytools.xtype.common.Func
module-attribute
¶
Generic callable that accepts arbitrary arguments.
xpytools.xtype.common.OptFunc
module-attribute
¶
Optional callable that may be None.
Numeric and Scalar Types¶
xpytools.xtype.common.Number
module-attribute
¶
Union of integer and float types.
xpytools.xtype.common.OptNumber
module-attribute
¶
Optional numeric type that may be None.
xpytools.xtype.common.NumericIterable
module-attribute
¶
Iterable that yields numeric values (ints or floats).
JSON-Like Convenience¶
xpytools.xtype.common.JSONPrimitive
module-attribute
¶
Primitive JSON-compatible scalar value.
xpytools.xtype.common.JSONArray
module-attribute
¶
JSON array represented as a list of nested JSON values.
xpytools.xtype.common.JSONObject
module-attribute
¶
JSON object represented as a dictionary of string keys.
xpytools.xtype.common.JSONValue
module-attribute
¶
Recursive union type representing any valid JSON value.