Skip to content

docs(playbook): note Python SDK v4 requirement and convert examples#218

Merged
dzimine-lc merged 1 commit into
masterfrom
playbook-sdk-v4-banner
May 5, 2026
Merged

docs(playbook): note Python SDK v4 requirement and convert examples#218
dzimine-lc merged 1 commit into
masterfrom
playbook-sdk-v4-banner

Conversation

@dzimine-lc
Copy link
Copy Markdown
Contributor

Summary

  • Add a "Python SDK v4 only" warning admonition at the top of the Playbook extension docs page, linking to the v4 SDK page and flagging the v5 page as not supported in playbooks.
  • Convert all examples on the page from v5 imports back to v4 APIs:
    • limacharlie.Manager() + limacharlie.Extension(man) (singular Extension in v4) for the Python invocation example.
    • limacharlie.Hive(sdk, "secret").get(name).data[...] for the webhook secret example (instead of from limacharlie.sdk.hive import Hive).
    • for sensor in sdk.sensors(): info = sensor.getInfo() and sensor.sid for the missing-sensor and IaC list-sensors examples (instead of sdk.list_sensors() + Sensor(sdk, sid).get_info()).
  • Update the sdk argument description under Playbook structure to reference limacharlie.Manager (v4) instead of Organization (v5).

Why

The Playbook execution environment is pinned to limacharlie>=4.11.3,<5 (see refractionPOINT/ext-playbook ext/requirements.txt). The previous examples used v5-only modules (limacharlie.sdk.organization, limacharlie.sdk.hive, limacharlie.sdk.sensor) that would ImportError in the sandbox. Companion PR in ext-playbook adds the same banner to the extension UI: refractionPOINT/ext-playbook#TBD.

Refs: https://github.com/refractionPOINT/tracking/issues/4237

Test plan

  • Run mkdocs serve locally and confirm the new !!! warning "Python SDK v4 only" admonition renders on the Playbook page.
  • Verify the relative links to python-sdk.md and python-sdk-v4.md resolve in the rendered site.
  • Eyeball the four updated code blocks for syntax / indentation (one Python invocation, one webhook, one missing-sensor playbook, one IaC YAML).
  • Optionally: copy each Python example into a v4-pinned env (pip install "limacharlie<5") and confirm imports succeed.

🤖 Generated with Claude Code

The Playbook extension's execution environment runs on LimaCharlie
Python SDK v4. v5 was just released but is not yet supported in
playbooks, so the existing examples (which used v5 imports like
limacharlie.sdk.organization.Organization, limacharlie.sdk.hive.Hive,
limacharlie.sdk.sensor.Sensor) would not run in the playbook sandbox.

- Add a "Python SDK v4 only" warning admonition under the page title,
  linking to the v4 SDK page and flagging the v5 page as not supported
  here.
- Update the sdk argument description to reference Manager (v4) instead
  of Organization (v5).
- Rewrite the Python invocation example to use limacharlie.Manager() +
  limacharlie.Extension(man) (singular Extension in v4).
- Rewrite the webhook playbook example to use limacharlie.Hive(sdk,
  "secret") instead of the v5 limacharlie.sdk.hive.Hive import.
- Rewrite the missing-sensor playbook and the IaC list-sensors example
  to use the v4 Manager.sensors() generator and Sensor.getInfo() / .sid,
  dropping the v5 list_sensors() + Sensor() constructor pattern.

Refs: refractionPOINT/tracking#4237

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dzimine-lc dzimine-lc merged commit 16d6fcc into master May 5, 2026
2 checks passed
@dzimine-lc dzimine-lc deleted the playbook-sdk-v4-banner branch May 5, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant