findmy.util.files#
Utilities to simplify reading and writing data from and to files.
Functions#
|
Save and return a JSON-serializable data structure. |
|
Read JSON data from a file if a path is passed, or return the argument itself. |
Module Contents#
- findmy.util.files.save_and_return_json(data: _T, dst: str | pathlib.Path | None) _T #
Save and return a JSON-serializable data structure.
- findmy.util.files.read_data_json(val: str | pathlib.Path | _T) _T #
Read JSON data from a file if a path is passed, or return the argument itself.