diff --git a/tools/python/jwutils/Bunch.py b/tools/python/jwutils/Bunch.py new file mode 100644 index 0000000..dc49a44 --- /dev/null +++ b/tools/python/jwutils/Bunch.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from typing import Any + +class Bunch: # export + + def __init__(self, **kwargs): + self.__dict__.update(kwargs) + + def __getitem__(self, key: str) -> Any: + return self.__dict__[key]