Skip to main content

playbook-md

Parser, validator, and summarizer for PLAYBOOK.md files — multi-step AI workflows written in plain markdown.

Installation

pip install playbook-md

Quick start

from playbook_md import parse_playbook, validate_playbook, summarize_playbook

markdown = open("my-workflow.playbook.md").read()

# Parse
result = parse_playbook(markdown)
if result.definition:
    print(f"Playbook: {result.definition.title}")
    print(f"Steps: {len(result.definition.steps)}")

# Validate
validation = validate_playbook(markdown)
if validation.valid:
    print("Playbook is valid!")
else:
    for err in validation.fatal_errors:
        print(f"Error: {err.message}")

# Summarize
if result.definition:
    summary = summarize_playbook(result.definition)
    print(f"Inputs: {summary.input_count}, Steps: {summary.step_count}")

API

  • parse_playbook(markdown: str) -> ParseResult — Parse a PLAYBOOK.md string into a structured definition.
  • validate_playbook(markdown: str) -> ValidationResult — Parse and semantically validate a PLAYBOOK.md string.
  • summarize_playbook(definition: PlaybookDefinition) -> PlaybookSummary — Generate a compact summary of a parsed playbook.
  • playbook_to_json(markdown: str) -> str — Parse a PLAYBOOK.md string and return the definition as JSON.
  • json_to_playbook(json_str: str) -> str — (Not yet implemented) Convert JSON back to PLAYBOOK.md markdown.

Requirements

  • Python 3.10+
  • Zero external dependencies (stdlib only)

License

MIT

Metadata

Release files for playbook-md 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for playbook-md 0.1.0
File Size Uploaded Provenance Actions
playbook_md-0.1.0.tar.gz 14.2 kB Without provenance Details for playbook_md-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for playbook-md 0.1.0
File Interpreter ABI Platform Actions
playbook_md-0.1.0-py3-none-any.whl Python 3 none any Details for playbook_md-0.1.0-py3-none-any.whl

Total release size: 27.5 kB

Release files / playbook_md-0.1.0.tar.gz

Download URL playbook_md-0.1.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d97e5442ab8245411276ff4ada0d04ef955d76b80312dcfa9d1e719df25b201b
BLAKE2b-256 checksum
How to use checksums
6ca57d77d36da4d9818801813ca6b301d2433739c03182a2db39ffab4407fcf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / playbook_md-0.1.0-py3-none-any.whl

Download URL playbook_md-0.1.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
575d911a851b4c693d9d37fbf41b14958f14891e378d291874068958d85b847c
BLAKE2b-256 checksum
How to use checksums
abe975a1b0117105c3b531c26cfa1fe758eac406da53effb24524257e0f420cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for playbook-md 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page