Skip to main content

pykeynote

Read, and soon write, Apple Keynote presentations from Python. pykeynote works on .key files directly, so it runs anywhere Python does. You don't need Keynote or a Mac.

A .key file is a zip of Snappy-compressed protobuf archives (Index/*.iwa) plus images and media in Data/. Decoding comes from keynote-parser, which supports files saved by Keynote up to 14.5.

Install

pip install pykeynote

For development, clone the repo and run pip install -e ".[dev]".

Reading a deck

from pykeynote import Presentation

deck = Presentation.open("talk.key")
print(deck.theme, deck.size, deck.layouts)

for slide in deck:
    print(slide.index, slide.layout, slide.title)
    for para in slide.paragraphs:          # text, indent level, bulleted?
        print("  " * para.level, para.text)
    print(slide.notes, slide.transition.effect, slide.skipped)

print(deck.to_markdown())

title and body are None when the slide's layout hides that placeholder.

Making and changing decks

from pykeynote import Presentation, Paragraph, from_markdown

deck = Presentation.new()                 # bundled Basic White theme, no slides yet
deck.add_slide("Title", title="Robots!", body="Kevin McAleer")
slide = deck.add_slide(
    "Title & Bullets",
    title="Why robots?",
    body=[Paragraph("They're fun"), Paragraph("Mostly", level=1), "They're useful"],
    notes="Keep this one short.",
)
slide.set_transition("dissolve", 1.5)
deck.save("talk.key")

deck = Presentation.open("talk.key")
deck[1].title = "Why robots? 🤖"
deck.duplicate_slide(1)
deck.move_slide(2, 0)
deck.delete_slide(-1)
deck[0].skipped = True
deck.save()                               # back to talk.key

deck = from_markdown(open("talk.md").read())
deck.save("from-markdown.key")

add_slide copies a slide that already uses the layout, so it keeps the theme's look. A deck from Presentation.new() has one of every layout to copy from, kept out of sight and left out when you save. For a deck you opened, at least one slide must already use the layout.

Markdown

to_markdown() writes one block per slide, separated by ---. Slide settings go in HTML comments, and presenter notes follow a ??? line:

<!-- layout: Title & Bullets -->
<!-- transition: dissolve 1.5s -->
# Why robots?

- They're fun
  - Mostly
- They're useful

???
Keep this one short.

Roadmap

  1. Read decks and export Markdown. Done.
  2. Edit text and notes, then save. Done.
  3. Add, duplicate, delete and reorder slides, set transitions and skipping, and build decks from Markdown. Done.
  4. More bundled themes, images, and build animations.

Driving Keynote directly (legacy)

pykeynote.scripting controls a running copy of Keynote on a Mac through AppleScript and JXA. It can already edit decks, but it will be removed once the file-based engine catches up.

Tests

pytest                                    # everything that runs without Keynote
PYKEYNOTE_INTEGRATION=1 pytest            # also drive real Keynote (macOS)

The sample decks in tests/fixtures/ were made in Keynote 14.5.

Metadata

Release files for pykeynote 0.2.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 pykeynote 0.2.0
File Size Uploaded Provenance
pykeynote-0.2.0.tar.gz 1.9 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pykeynote 0.2.0
File Interpreter ABI Platform
pykeynote-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.3 MB

Release files / pykeynote-0.2.0.tar.gz

Download URL pykeynote-0.2.0.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
cf841159bfb3a58e93d1555123e12279ed83bc301bfab085f1fe0a24fb72b59c
BLAKE2b-256 checksum
How to use checksums
a16a98e9d37589e4b0be986c436c840d86a2af5150f343042f1273640727b8b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Release files / pykeynote-0.2.0-py3-none-any.whl

Download URL pykeynote-0.2.0-py3-none-any.whl
Size 379.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8563d39e9140f1371458bd0d305bf44bf6c0a9af9b44316ce5fe2caa328f86c
BLAKE2b-256 checksum
How to use checksums
6c4eca958c1f3f44431d172a8b0830fe00ccbb20a2c0ff4d6b6ac3a9f852f9d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Security for pykeynote 0.2.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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pykeynote-0.2.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 Oct 23, 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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