Core¶
-
basic_utils.core.
slurp
(fname)[source]¶ Reads a file and all its contents, returns a single string
Return type: str
-
basic_utils.core.
clear
()[source]¶ Clears the terminal screen from python, operating system agnostic
Return type: None
-
basic_utils.core.
to_string
(objects, sep=', ')[source]¶ Converts a list of objects into a single string
>>> to_string([1, 2, 3]) '1, 2, 3'
Return type: str
-
basic_utils.core.
getattrs
(obj, keys)[source]¶ Supports getting multiple attributes from a model at once
Return type: Tuple
[Any
, ...]
-
basic_utils.core.
map_getattr
(attr, object_seq)[source]¶ Returns a map to retrieve a single attribute from a sequence of objects
Return type: Tuple
[Any
, ...]