structures¶
Helper structures for Rhodes.
-
class
rhodes.structures.JsonPath(path)[source]¶ Bases:
objectRepresents a JSONPath variable in request/response body.
Parameters: path – JSONPath to desired data in state input data
-
class
rhodes.structures.ContextPath(path='$$')[source]¶ Bases:
objectRepresents a JSONPath(ish) variable in the Context Object.
Parameters: path (str) – Path to value in Context Object. In addition to specifying the path manually, you can specify valid paths through dot-notation. For example:
ContextPath("$$.Execution.Id") == ContextPath().Execution.IdContextPath("$$.Map.Item.Value.foo.bar") == ContextPath().Map.Item.Value.foo.bar
-
class
rhodes.structures.Parameters(**kwargs)[source]¶ Bases:
objectRepresents parameters that can be passed to various state fields.
If a
JsonPathis provided as a field value, the field name will be automatically appended with a.$value when the state machine is serialized to indicate to Step Functions to de-reference the value.For example:
>>> Parameters(foo=bar, baz=JsonPath("$.wat.wow")).to_dict() {"foo": "bar", "baz.$": "$.wat.wow"}