MCPcopy
hub / github.com/guardicore/monkey / dict

Method dict

monkey/common/base_models.py:50–56  ·  view source on GitHub ↗
(self, simplify=False, **kwargs)

Source from the content-addressed store, hash-verified

48 # merged. If the feature doesn't get merged, or the interface is changed, this function can
49 # continue to serve as a wrapper until we can update all references to it.
50 def dict(self, simplify=False, **kwargs):
51 if simplify:
52 # Allow keyword arguments to be passed to `json()`
53 # We can pass kwargs to `json()` because the parameters of BaseModel.json() are a
54 # superset of those of BaseModel.dict().
55 return json.loads(self.json(**kwargs))
56 return BaseModel.dict(self, **kwargs)
57
58
59class MutableInfectionMonkeyBaseModel(InfectionMonkeyBaseModel):

Calls

no outgoing calls