python-pptx

Create, read, and update PowerPoint presentations programmatically in Python

Library
PyPI
v1.0.2
3,495stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
45/100Fair
Development Activity0
Maintenance0
Community80
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
73/100Good
Architecture75
Code Quality78
Innovation68
Learning Curve70

python-pptx is a Python library for creating, reading, and updating PowerPoint (.pptx) files without needing PowerPoint installed or licensed. It is commonly used to generate presentations from dynamic content such as database queries, analytics output, or JSON payloads, often in response to an HTTP request that returns a generated PPTX file.

The library models the OOXML slide format as a tree of Python objects — presentations, slides, shapes, text frames, tables, and charts — so consumers can build or edit decks with plain Python objects instead of manipulating XML directly. It can also analyze existing decks in a corpus, for example to extract text for search indexing or pull embedded images.

What You Get

  • A Presentation object model covering slides, slide layouts, and slide masters
  • Shape APIs for text boxes, images, tables, and native PowerPoint charts
  • Read/write access to existing .pptx files for templating and bulk editing
  • Fine-grained control over fonts, colors, alignment, and placeholders
  • Support for embedding images (BMP, GIF, JPEG, PNG, TIFF, WMF) and chart data

Common Use Cases

  • Generating PowerPoint reports from database queries or analytics pipelines
  • Serving a dynamically-built .pptx file as an HTTP response
  • Templating recurring decks (e.g. weekly status decks) by editing a base .pptx
  • Extracting text and images from a corpus of presentations for search indexing or analysis
  • Automating tedious manual slide production tasks

Under The Hood

Architecture — python-pptx models a .pptx file as an OPC (Open Packaging Conventions) package: pptx/opc/package.py handles the zip-based part/relationship graph, while a content_type_to_part_class_map in pptx/__init__.py dispatches each XML part (slide, slide layout, slide master, chart, image, core properties) to a dedicated Part subclass under pptx/parts/. User-facing objects (Presentation, Slide, Shape, Table, Chart) in pptx/presentation.py, pptx/slide.py, pptx/shapes/, pptx/table.py, and pptx/chart/ wrap these parts’ underlying lxml-parsed OOXML elements (pptx/oxml/), giving a Pythonic object layer over the raw XML tree while lazily writing changes back on save. Tech Stack — pure Python (94% of the codebase) with a thin lxml dependency for XML parsing, Pillow for image introspection, and XlsxWriter for embedded chart workbook data; packaging uses setuptools with pyproject.toml, and the project ships inline type stubs (py.typed, a typings/ directory) checked with pyright. Code Quality — the repo pairs a large unittest/pytest-based tests/ tree (83 test files) with a parallel features/ directory of Gherkin behavioral specs, giving both unit-level and end-to-end acceptance coverage; module boundaries are organized by OOXML concern (opc, oxml, parts, shapes, dml, enum) which keeps low-level XML manipulation isolated from the public object API. API Design — the public surface is a single Presentation(path) entry point returning an object graph navigated with attribute access (prs.slides, slide.shapes, shape.text_frame) rather than raw XML manipulation, which keeps common operations (add a slide, insert a table, set text) low-boilerplate, though deeper formatting control still requires understanding the underlying OOXML concepts the object model is built on.

Used by 9 apps in this directory

Python
100%
Apache 2.0

Agno

Devops · AI Development · Automation

41,774

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
67
Dependency
Built with
Python100%
Updated today
TypeScript
48%
AGPL 3.0

Banana Slides

AI Design Tools · Productivity

15,476

AI-native PPT generator with Vibe editing, multi-LLM support, and fully editable PPTX export

View details
83
Repo Health
82
Technical
71
Dependency
Built with
TypeScript48%
Python47%
Updated 3 days ago
Python
63%
Apache 2.0

GPT Researcher

Productivity · AI Assistants

29,039

The pioneering open-source autonomous AI agent that conducts deep, multi-source research and produces citation-backed reports exceeding 2,000 words — faster and more reliably than any human researcher.

View details
88
Repo Health
91
Technical
64
Dependency
Built with
Python63%
TypeScript23%
Updated 1 months ago
Python
83%
Apache 2.0

knowhere

AI Development · Developer Tools

2,515

Transform messy, unstructured documents into persistent, navigable memory that AI agents can actually use.

View details
83
Repo Health
75
Technical
70
Dependency
Built with
Python83%
HTML16%
Updated today
Python
37%
Other

Open WebUI

AI Assistants · AI Agents

149,204

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python37%
Svelte33%
JavaScript22%
Updated today
TypeScript
94%
Other

OpenHands

AI Code Assistants · AI Development

84,452

The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.

View details
91
Repo Health
82
Technical
71
Dependency
Built with
TypeScript94%
Updated today
Python
74%
AGPL 3.0

OpenViking

Databases · AI Development

29,711

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
84
Repo Health
75
Technical
65
Dependency
Built with
Python74%
Rust14%
Updated today
Python
85%
Apache 2.0

PrivateGPT

AI Development

57,445

The open-source API layer that turns local LLMs into production private AI applications with full Claude API compatibility

View details
88
Repo Health
83
Technical
71
Dependency
Built with
Python85%
HTML11%
Updated today
TypeScript
98%
MIT

Skrun

AI Agents

208

An open, self-hostable, multi-model agent runtime that deploys any agent skill as an API via POST /run — an open-source alternative to Claude Managed Agents and Google's Gemini Enterprise Agent Platform.

View details
42
Repo Health
66
Technical
78
Dependency
Built with
TypeScript98%
Updated 2 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search