power-pptx

API Reference

This reference covers the public API of power-pptx v2.12.0. Everything on the 1.0.2 upstream surface still works; fork additions are markedfork. Theupstream Sphinx docsprovide prose deep-dives; this section is the structured map of the surface.

Top-level package: power_pptx

from power_pptx import (
    Presentation,          # factory: Presentation() or Presentation("file.pptx")
    BBox,                  # immutable rectangular region; splats into add_* APIs
    audit, AuditReport,    # one-call deck audit → markdown report
    # Figure adapters (lazy third-party deps)
    add_plotly_figure, add_matplotlib_figure,
    add_svg_figure, add_html_figure, FigureBackendUnavailable,
    # Shape-level building blocks (token-driven)
    add_kpi_card, add_progress_bar, add_gauge,
    add_status_pill, add_stat_strip, add_article_card,
    KpiCard, ProgressBar, Gauge, StatusPill, StatStrip, ArticleCard,
)

Module map

Reading the signatures

  • Lengths are EMU-backed int subclasses: Inches, Pt,Cm, Emu, Mm from power_pptx.util.
  • Colours accept hex strings, (r, g, b) tuples, or RGBColor.
  • Unset optional properties return None; assign None to clear them.
  • Exceptions live in power_pptx.exc — e.g.PackageNotFoundError, CairoSvgUnavailable,ThumbnailRendererUnavailable, FigureBackendUnavailable.