python-pptx

Create, read, and update PowerPoint presentations programmatically in Python

Library
PyPI
v1.0.2
3,544 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
45 /100 Fair
Development Activity 0
Maintenance 0
Community 80
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
73 /100 Good
Architecture 75
Code Quality 78
Innovation 68
Learning Curve 70

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

AI Development · Automation · Devops

42,358

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

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 4 days ago
TypeScript
49%
AGPL 3.0

Banana Slides

AI Design Tools · Productivity

15,667

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

View details
84
Repo Health
82
Technical
71
Dependency
Built with
TypeScript 49%
Python 46%
Updated 5 days ago
Python
70%
Apache 2.0

GPT Researcher

AI Assistants · Productivity

29,650

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
91
Repo Health
91
Technical
63
Dependency
Built with
Python 70%
TypeScript 18%
Updated 6 days ago
Python
86%
Apache 2.0

knowhere

AI Development · AI Memory · Developer Tools

3,541

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

View details
82
Repo Health
75
Technical
66
Dependency
Built with
Python 86%
HTML 14%
Updated 1 weeks ago
Python
37%
Other

Open WebUI

AI Agents · AI Assistants

153,390

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
Python 37%
Svelte 34%
JavaScript 21%
Updated 4 days ago
TypeScript
95%
Other

OpenHands

AI Code Assistants · AI Development

89,328

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
67
Dependency
Built with
TypeScript 95%
Updated 5 days ago
Python
75%
AGPL 3.0

OpenViking

AI Development · AI Memory · Databases

38,819

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

View details
85
Repo Health
75
Technical
64
Dependency
Built with
Python 75%
Rust 12%
Updated 4 days ago
Python
86%
Apache 2.0

PrivateGPT

AI Development

57,548

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

View details
87
Repo Health
83
Technical
69
Dependency
Built with
Python 86%
Updated 1 weeks ago
TypeScript
95%
MIT

Skrun

AI Agents

209

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
56
Repo Health
66
Technical
78
Dependency
Built with
TypeScript 95%
Updated 1 weeks 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