Playbooks now support the v5 Python SDK

You can now write playbooks against v5 of the LimaCharlie Python SDK. Your existing playbooks keep running on v4 with no changes. To move a playbook to v5, add sdk_version: "5" to its playbook record:

python: |
  def playbook(sdk, data):
      info = sdk.get_info()
      return {"data": {"oid": sdk.oid, "name": info.get("name")}}
sdk_version: "5"

With v5, the sdk argument is a pre-authenticated limacharlie.sdk.organization.Organization instead of the v4 Manager. If the request has no credentials, sdk is None, same as in v4. Each v5 playbook runs in its own isolated process.

A few differences from v4:

  • Whatever your playbook returns must be JSON-serializable.
  • is_interactive only works on v4. A v5 request with is_interactive=true is rejected.
  • If you leave sdk_version out, leave it empty or set it to "4", you get v4. Any other value returns an error.

You can migrate one playbook at a time and keep v4 and v5 playbooks running side by side in the same org.

SDK docs: v5 · v4