WolfSDKWolfXLWolfPPTWolfDocxWolfRender

WolfPPT - Documentation

How do I migrate python-pptx code to WolfPPT without assuming full compatibility?

Migrate one exercised python-pptx workflow at a time, starting with a no-op save and a package-member comparison. WolfPPT offers familiar facade names, but shared names do not prove complete behavioral compatibility, current-source API availability, or PowerPoint rendering parity.

Last updated: November 9, 2026.

WolfPPT documentation

Inventory the calls before changing imports

List the constructors, collection operations, shape properties, chart helpers, and save destinations that your script actually uses. Compare those calls with the versioned API topic and the engine compatibility matrix. A migration is a claim about that concrete workflow and its input decks, not about two top-level import statements looking similar.

The published Community 0.1.6 wheel checked for these docs does not contain wolfppt.util, wolfppt.enum, or wolfppt.chart. Keep explicitly required helper imports from python-pptx where appropriate. The chart example uses its CategoryChartData, enum, and Inches objects while opening and saving with WolfPPT. Do not perform a package-wide search-and-replace that points those imports at namespaces absent from the installed release.

Start with a no-op package comparison

The complete sample creates its own input, saves an unchanged copy with WolfPPT, and compares ZIP member names and uncompressed member bytes. That is the relevant comparison for package-member preservation: ZIP container metadata and compression details are not the same thing as the bytes of an XML or media member. The check does not claim that two complete archive files have identical hashes.

For an actual migration, use your own representative source in place of the synthetic setup. Record the input version and expected untouched members. Then apply one supported edit, reopen the result, and assert the business value. Where part changes are expected, review their scope rather than ignoring every difference or declaring the whole output lossless based only on a readable title.

Complete example

from pathlib import Path
from tempfile import TemporaryDirectory
from zipfile import ZipFile
from wolfppt import Presentation

seed = Presentation()
slide = seed.slides.add_slide(seed.slide_layouts[6])
slide.shapes.add_textbox(0, 0, 3657600, 914400).text = "Review"
seed.save("migration-source.pptx")

def members(path):
    with ZipFile(path) as package:
        return {name: package.read(name) for name in package.namelist()}

with TemporaryDirectory() as directory:
    output = Path(directory) / "unchanged.pptx"
    Presentation("migration-source.pptx").save(output)
    before = members("migration-source.pptx")
    after = members(output)
    assert before == after
    print("No-op member bytes preserved")

Separate editing from authoring and rendering

The facade can create a bounded synthetic presentation and supports the edits shown in these docs. That does not make it a substitute for every python-pptx authoring API. Keep python-pptx for building decks from scratch when the required authoring operation is not listed or qualified for your WolfPPT version. Do not fall back silently during a file mutation and call the result a verified WolfPPT workflow.

Preservation means retaining package content, not necessarily understanding it. A chart, theme, custom XML part, media object, or unsupported extension can survive a round trip without being supported by a native renderer. Commercial rendering has explicit font assets, omissions, and refusals. Its output uses WolfPPT layout and does not claim equivalence with Microsoft PowerPoint.

Qualify boundaries that matter to your application

Test the actual input family, target selection, text lengths, chart-data shape, and output handling your application needs. The slide documentation uses saved stages because one combined duplication, movement, and deletion workflow failed in 0.1.6. That concrete boundary is more useful than assuming every available method can be freely combined before save.

Ordinary editing, source-bound Commercial reporting, and Wolf Runtime are separate contracts. A package reopen does not imply schema validation, font fitting, PDF conversion, chart workbook recalculation, or a Commercial verification receipt. Decide which checks are required for your application and retain evidence for each one. When an operation is unsupported or refuses, preserve the input and revise the workflow instead of removing guards to obtain an output file.

Evaluation boundary

The goal of the comparison is a controlled cutover, not an indefinite compatibility layer. Once a workflow is qualified, make its chosen editor and dependencies explicit. If a required operation remains unsupported, retain the established tool for that workflow and document the boundary rather than advertising a broader migration than the evidence supports.

What it does not do

  • The executed preservation example covers its synthetic no-op deck, not every presentation.
  • Shared python-pptx names do not promise identical behavior for every operation.
  • Current-source documentation may describe APIs absent from the installed PyPI release.
  • No Office GUI rendering parity, universal chart coverage, or automatic visual acceptance is claimed.