def __init__(self, **kwargs): if not self.__tupleType__: raise NotImplementedError( "TupleActionABC can not be instantiated," " please inherit it and implement a tuple" ) Tuple.__init__(self, **kwargs) if not "uuid" in kwargs: self.uuid = str(uuid.uuid1()) # Based on the host, and the time if not "dateTime" in kwargs: self.dateTime = datetime.now(pytz.utc)
def _convertJsonDispsToTuples(branchTuple: BranchTuple) -> List: """ Convert Json Disps to Tuples """ disps: List = [] for jsonDisp in branchTuple.disps: disp = Tuple.smallJsonDictToTuple(jsonDisp) disp.coordSetId = branchTuple.coordSetId disp.branchId = branchTuple.id if hasattr(disp, "geomJson"): disp.geomJson = json.dumps(disp.geomJson) disps.append(disp) return disps
def __init__(self, key=None, value=None): PolymorphicVerticalProperty.__init__(self, key=key, value=value) Tuple.__init__(self)
def __init__(self, *args, **kwargs): # logger.debug("TestTuple constructed") Tuple.__init__(self, *args, **kwargs)
def _parseTuple(self, bytes_): json_ = json.loads(bytes_.decode("utf-8")) return Tuple.restfulJsonDictToTupleWithValidation( json_, self._ResponseTuple)
def __init__(self, name: Optional[str] = None, selector: Optional[Dict] = None) -> None: Tuple.__init__(self) self.name = name self.selector = selector if selector else {}
def addExtensionObject(self, Tuple, ormCrudHandlerExtension): self.extensions[Tuple.tupleType()] = ormCrudHandlerExtension
def f(cls): self.extensions[Tuple.tupleType()] = cls() return cls
def __init__(self, **kwargs): Tuple.__init__(self, **kwargs) self.packedJson__ = [None] * (BranchTuple.__LAST_INDEX_NUM + 1)