Registry / database / pypptx-with-oxml

pypptx-with-oxml

JSON →
library1.0.3pypypi✓ verified 86d ago

A fork of python-pptx (v1.0.3) that exposes the oxml internal module for direct XML manipulation while keeping the same high-level API. Provides create, read, and update support for PowerPoint 2007+ (.pptx) files. Requires Python >=3.8.

pip install pypptx-with-oxml
INSTALL
IMPORT
SIG · PYPPTX-WITH-OXML
P
pypptx-with-oxml
databasepythonv1.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Presentation
from pptx import Presentation
Standard import, same as python-pptx.
oxml
from pptx import oxml
from pptx.oxml import something # raises ImportError
In this fork, oxml is exposed as a top-level attribute after import pptx; 'from pptx.oxml' does not work.

Create a simple presentation with one slide.

from pptx import Presentation from pptx.util import Inches, Pt prs = Presentation() slide = prs.slides.add_slide(prs.slide_layouts[6]) # blank slide.shapes.title.text = 'Hello, World!' prs.save('test.pptx')
Debug
Known issues
breakingoxml is not a submodule; you must access it via 'from pptx import oxml' after importing pptx, not 'from pptx.oxml import ...'.
fix
Use 'from pptx import oxml' and then access e.g. oxml.parse_xml().
affects: all
gotchaThis fork may lag behind upstream python-pptx; check for feature parity.
fix
Review upstream changelog before relying on new python-pptx features.
affects: all
deprecatedDirect manipulation of oxml bypasses high-level validation; corrupt presentations are possible.
fix
Prefer high-level API methods; use oxml only when necessary and validate output.
affects: all
Errors
Common errors & fixes
ImportError: cannot import name 'element' from 'pptx.oxml'
oxml is not a package in this fork; it's a module attribute.
fix
Replace 'from pptx.oxml import element' with 'from pptx import oxml' then use oxml.element.
AttributeError: module 'pptx' has no attribute 'oxml'
Attempted to access oxml before importing pptx or using old import pattern.
fix
Ensure you have installed pypptx-with-oxml (not python-pptx) and use 'from pptx import oxml' after importing pptx.
Upgrade
Version history
1.0.3latest on PyPI · released Jan 30, 2026
Audit
Dependencies
lxmlrequiredXML processing core
PillowrequiredImage handling for slides
Agent activity
9 hits · last 30 days
node
8
Resources
pypptx-with-oxml — pip install pypptx-with-oxml · libregistry