structures¶
Helper structures for Rhodes.
-
class
rhodes.structures.
JsonPath
(path)[source]¶ Bases:
object
Represents a JSONPath variable in request/response body.
Parameters: path – JSONPath to desired data in state input data
-
class
rhodes.structures.
ContextPath
(path='$$')[source]¶ Bases:
object
Represents 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.Id
ContextPath("$$.Map.Item.Value.foo.bar") == ContextPath().Map.Item.Value.foo.bar
-
class
rhodes.structures.
Parameters
(**kwargs)[source]¶ Bases:
object
Represents parameters that can be passed to various state fields.
If a
JsonPath
is 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"}