python-pptx

Create, read, and update PowerPoint presentations programmatically in Python

Library
PyPI
v1.0.2
3,512stars
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

42,074

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
Python100%
Updated yesterday
TypeScript
49%
AGPL 3.0

Banana Slides

AI Design Tools · Productivity

15,554

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
TypeScript49%
Python46%
Updated yesterday
Python
67%
Apache 2.0

GPT Researcher

Productivity · AI Assistants

29,319

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
90
Repo Health
91
Technical
63
Dependency
Built with
Python67%
TypeScript20%
Updated 1 weeks ago
Python
85%
Apache 2.0

knowhere

AI Development · Developer Tools

2,942

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

View details
83
Repo Health
75
Technical
69
Dependency
Built with
Python85%
HTML15%
Updated yesterday
Python
37%
Other

Open WebUI

AI Assistants · AI Agents

151,143

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%
Svelte34%
JavaScript21%
Updated yesterday
TypeScript
94%
Other

OpenHands

AI Code Assistants · AI Development

86,377

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
70
Dependency
Built with
TypeScript94%
Updated today
Python
74%
AGPL 3.0

OpenViking

Databases · AI Development

35,793

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 yesterday
Python
86%
Apache 2.0

PrivateGPT

AI Development

57,494

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
Python86%
HTML10%
Updated 4 days 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
52
Repo Health
66
Technical
78
Dependency
Built with
TypeScript95%
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

Search