Skip to main content

rpptx-py

Native rpptx for Python

rpptx gives Python applications a native PPTX workflow for creating, opening, editing, and saving PowerPoint-compatible presentations. It also supports comments, speaker notes, and deterministic rendering. It works directly with OOXML packages and does not require Microsoft PowerPoint, LibreOffice, a conversion service, or a Java or .NET runtime.

The package runs the Rust rpptx presentation engine locally, exposes a typed Python API, and ships a default template for from-scratch deck creation. It renders slides and speaker notes without a remote service, supports review through notes and modern comment threads, and preserves safe package content outside the focused Python editing surface.

Installation

Install the current release from PyPI:

python -m pip install rpptx

rpptx requires CPython 3.9 or newer. Its platform wheels use the Python 3.9 stable ABI, so one wheel supports multiple compatible Python versions. Source installation requires a Rust toolchain and maturin.

Quick start

from rpptx import Presentation
from rpptx.util import Inches

presentation = Presentation()
slide = presentation.slides.add_slide(presentation.slide_layouts[6])
text_box = slide.shapes.add_textbox(
    Inches(1), Inches(1), Inches(8), Inches(1)
)
text_box.text = "Quarterly review"
presentation.save("review.pptx")

pdf = presentation.to_pdf()
with open("review.pdf", "wb") as output:
    output.write(pdf)

Capabilities

  • File and byte-based PPTX input and output.
  • Slide layouts, slides, placeholders, shapes, text frames, paragraphs, runs, pictures, preset shapes, and tables.
  • Deterministic PDF and PNG output for slides and speaker notes.
  • Formatting-preserving text replacement across slides and speaker notes, on one slide or in one text frame, with an optional expected count that leaves the deck unchanged on a mismatch.
  • Package and PresentationML validation that returns the issues rpptx validate reports as typed values.
  • Speaker-note text plus modern comment authors, threads, replies, thread resolution and removal, and ordered comment movement.
  • Master, layout, placeholder, theme, shape, chart, media, and relationship state remains inside the native presentation engine during package edits.
  • Read speaker-note text and inspect or mutate modern comment threads.
  • Python collections with negative indexes, slices, iteration, and explicit stale-handle errors after structural changes.
  • Table cell merge and split, cell fills, margins, and borders, and row heights.
  • Table rows and columns added with table.rows.add_row() and table.columns.add_column() and removed with remove, keeping merged cells and the frame size in step.
  • Picture crop, read and written as in python-pptx.
  • Shape z-order through slide.shapes.move(from_, to).
  • Group members added through group.shapes, with the group refit to its members as in python-pptx.
  • Run hyperlinks, read, added, retargeted, and removed as in python-pptx.
  • Shape click actions, a hyperlink or a slide jump, through shape.click_action as in python-pptx.

Use it when

Use rpptx when a Python service, desktop application, or automation task needs to create, inspect, update, comment on, or render presentations locally. It is suited to generated decks, template workflows, review, and previews.

Relationship

The Python API is intentionally focused. It covers the documented rpptx surface and the reviewed python-pptx Getting Started workflows, but it is not a drop-in replacement for every python-pptx method or private lxml object.

Example

Open and inspect an existing presentation:

from rpptx import Presentation

presentation = Presentation("deck.pptx")
print(len(presentation.slides))
png = presentation.render_slide_to_png(0)
for slide in presentation.slides:
    print(slide.notes_text or "")

Type checking

The distribution includes hand-written extension stubs and a py.typed marker. Editors and type checkers can inspect concrete presentation, slide, shape, text, table, notes, and comment types.

python -m pip install mypy
python -m mypy your_application.py

The release gate validates the installed package with strict mypy and stubtest in addition to its runtime suite.

License

Licensed under either the MIT License or the Apache License 2.0, at your option.

Licensed font embedding

Use caller-owned font bytes with explicit authorization under their exact license identity. Binary readers are bounded and consumed through actual EOF.

from pathlib import Path
from rpptx import Presentation, FontEmbeddingLicense

value = Presentation()
license = FontEmbeddingLicense(authorized=True, identity="SIL Open Font License 1.1")
value.embed_font("My Face", Path("MyFace-Regular.ttf"), license=license)
value.save("embedded.pptx")
for font in value.embedded_fonts:
    print(font)
value.embed_true_type_fonts = False
value.remove_embedded_font("My Face", "regular")

Kinds are regular, bold, italic and bold_italic. Snapshots are immutable and remain readable after later native edits. Flags distinguish None, False and True, where None removes only the owned setting. Explicit caller render fonts override matching embedded faces. Unsupported imported PowerPoint formats retain original bytes with absent decoded data.

Package signatures

Presentation.sign(private_key, certificate) accepts bytes containing a PKCS#8 RSA private key and X.509 certificate as DER or single unencrypted PEM blocks. Each input is limited to1MiB. The returned ordinary dictionary reports signer identity, cryptographic validity, complete package coverage, covered parts, relationships and precise issue payloads. verify_signatures() returns a tuple of these dictionaries for current content, or an empty tuple when unsigned. Later edits can invalidate a signature. Verification preserves live handles. The certificate identity does not establish certificate-chain trust. Existing native refusals of signed input and external relationships remain in force.

Metadata

Release files for rpptx 0.15.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 rpptx 0.15.0
File Size Uploaded Provenance Actions
rpptx-0.15.0.tar.gz 7.1 MB With provenance Details for rpptx-0.15.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rpptx 0.15.0
File Actions
rpptx-0.15.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for rpptx-0.15.0-cp39-abi3-win_amd64.whl
rpptx-0.15.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for rpptx-0.15.0-cp39-abi3-musllinux_1_2_x86_64.whl
rpptx-0.15.0-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for rpptx-0.15.0-cp39-abi3-manylinux_2_28_x86_64.whl
rpptx-0.15.0-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for rpptx-0.15.0-cp39-abi3-manylinux_2_28_aarch64.whl
rpptx-0.15.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for rpptx-0.15.0-cp39-abi3-macosx_11_0_arm64.whl
rpptx-0.15.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for rpptx-0.15.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 91.3 MB

Release files / rpptx-0.15.0.tar.gz

Download URL rpptx-0.15.0.tar.gz
Size 7.1 MB
Tags Source
SHA-256 checksum
How to use checksums
d75f2e8e0bc2e200eaa41f2c7adf1adfc68b4c2a21e6074f12c799e0b688625d
BLAKE2b-256 checksum
How to use checksums
4958ead06198cc49f7d90902a2eba0d5ffa94d798781c363c120307684e04e25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / rpptx-0.15.0-cp39-abi3-win_amd64.whl

Download URL rpptx-0.15.0-cp39-abi3-win_amd64.whl
Size 14.5 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
05f9069179b91a21d26e39c1f6dd32e0f567a1198d2cd41687fed0c4eedc0c46
BLAKE2b-256 checksum
How to use checksums
49b7a9757214d46de9bfb8f23539c73e7344d7b99be4c207a6a33dfe0eae59dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / rpptx-0.15.0-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL rpptx-0.15.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 14.3 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
4a067071c518d464c6d161b583d2d29eee376ce53f8c7d9124bb6a679a1f0569
BLAKE2b-256 checksum
How to use checksums
8fb11794eee78fed51ae11f39ed6cea937abd58695d3f9960c85991e3598f387
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / rpptx-0.15.0-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL rpptx-0.15.0-cp39-abi3-manylinux_2_28_x86_64.whl
Size 14.1 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
f9254be30933fd4a3410b3724a9d9a614d914621e5c72d11f4a2278824f7f6fc
BLAKE2b-256 checksum
How to use checksums
9476364fe013b2b592fccd788608b9ec001fffa7b0fe270f1d356062eacadd4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / rpptx-0.15.0-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL rpptx-0.15.0-cp39-abi3-manylinux_2_28_aarch64.whl
Size 13.7 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
f53366de9c8e0b731fa349eba4fe0bb9744a85918e3ab00ab306ebee15e4180f
BLAKE2b-256 checksum
How to use checksums
b9bdf9eae82151309775c9126b9b47ad6b450d0aba9ba61d45d64ed4422001e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / rpptx-0.15.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL rpptx-0.15.0-cp39-abi3-macosx_11_0_arm64.whl
Size 13.7 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b4062be0a5854c191246ce9ec3b7a0ecf499f8ee0b33b6214ea246a69303216a
BLAKE2b-256 checksum
How to use checksums
75da2d2c726d021929bfdf8cb3c2e8288791688d0cc099153ebf2a85d491b396
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Release files / rpptx-0.15.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL rpptx-0.15.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 13.9 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
258f323a53ffe6575bf10ba7e78f00c0d5d69e684a398a507dd2d944ec2f29c6
BLAKE2b-256 checksum
How to use checksums
53da1eb1ba35ec23b7cebbd6229636462d6d4352ccdaf7ffcffefe58553b9e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

Security for rpptx 0.15.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.

Full provenance

All 7 files in this release have been uploaded with provenance metadata.

Select from 7 files

Attestation for rpptx-0.15.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.

Transparency log

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.

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