pypyr.steps.contextclear permalink

Remove the specified items from the context.

Will iterate contextClear and remove those keys from context.

steps:
  - name: pypyr.steps.contextclear
    description: delete these 2 context keys
    in:
      contextClear:
        - removeMe
        - removeMeToo

For example, say input context is:

key1: value1
key2: value2
key3: value3
key4: value4
contextClear:
    - key2
    - key4
    - contextClear

This will result in return context:

key1: value1
key3: value3

Notice how contextClear also cleared itself in this example.

see also

last updated on .