wallaroo.visibility
1from enum import Enum 2 3 4class _Visibility(str, Enum): 5 """Represents the visibility of a Model or Pipeline""" 6 7 PRIVATE = "private" 8 PUBLIC = "public" 9 GROUP = "group" 10 11 @staticmethod 12 def from_str(label: str): 13 """Creates a Visibility from a str""" 14 label = label.lower() 15 if label == "private": 16 return _Visibility.PRIVATE 17 elif label == "public": 18 return _Visibility.PUBLIC 19 else: 20 raise NotImplementedError