Teach run_tests.py to abort inflight tests in case of emergency shutdown.
[pyutils.git] / src / pyutils / dict_utils.py
index e5fbb48a38800a938df3aea16bd99ada888ece72..c269723a8d3684348f8ec07434fb6588d5b40bf7 100644 (file)
@@ -7,6 +7,8 @@
 from itertools import islice
 from typing import Any, Callable, Dict, Iterator, List, Tuple
 
+from pyutils import dataclass_utils
+
 
 def init_or_inc(
     d: Dict[Any, Any],
@@ -361,6 +363,11 @@ def dict_to_key_value_lists(d: Dict[Any, Any]) -> Tuple[List[Any], List[Any]]:
     return r
 
 
+dict_to_dataclass = dataclass_utils.dataclass_from_dict
+
+dict_from_dataclass = dataclass_utils.dataclass_to_dict
+
+
 if __name__ == '__main__':
     import doctest