$npx skillfedfor your agent

EbookLib

Ebook library which can handle EPUB2/EPUB3 format

Worth itPyPI Python ModulesReleased Oct 20251.3M downloads / moPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — ebooklib-0.20-py3-none-any.whl
v0.20 · released 2025-10-26 · Python >=2.7 · 2 runtime deps: lxml, six

Yes. EbookLib is a mature, actively maintained library with low install friction, no known vulnerabilities, and a clear use case for anyone working with EPUB files programmatically. The AGPL license is a significant consideration for proprietary projects, but poses no barrier for open-source work. Install it if you need to read, write, or manipulate EPUB files in Python.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Low install friction with only two runtime dependencies (lxml and six).
  • The project is actively maintained with a recent commit on 2026-07-27 and 1802 repository stars.
  • Version 0.20 is marked as the final release supporting Python 2.7; future versions will drop legacy support.

License · maintenance · safety

(agpl) — Licensed under AGPL, which requires that any modifications or derivative works using this library must also be released under AGPL. This is a copyleft license with stronger obligations than permissive licenses—suitable for open-source projects but may conflict with proprietary software licensing strategies.

last release 2025-10-26 (292 days) · last repo commit 2026-07-27 · 1,802 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,309,072 downloads/mo, #4,077 on PyPI

Verify before relying

from ebooklib import epub

# Read an EPUB file
book = epub.read_epub('test.epub')
for image in book.get_items_of_type(ebooklib.ITEM_IMAGE):
    print(image.get_name())

# Write an EPUB file
book = epub.EpubBook()
book.set_title('My Book')
epub.write_epub('output.epub', book)
  • Whether the library handles all EPUB3 optional features (e.g., fixed layouts, media overlays, embedded fonts).
  • Performance characteristics when processing large EPUB files or batch operations.
  • Compatibility with non-standard or corrupted EPUB files in the wild.
Same gist for agents: .md · .json

What it is and what it does

EbookLib is a Python library for reading and writing EPUB2 and EPUB3 e-book files. It provides a straightforward API to parse EPUB archives, extract content (text, images, metadata), and programmatically construct new e-books from scratch. The library handles the underlying XML structure and ZIP packaging that EPUB files use, exposing a higher-level interface for chapters, metadata, covers, tables of contents, and styling.

The package depends on lxml for XML processing and six for Python 2/3 compatibility (though version 0.20 is the final release supporting Python 2.7). It is actively maintained, supports modern Python versions (3.9–3.13), and is used in production by several open-source projects including Booktype, Marker, and Telemeta. The API is designed to handle both simple operations and complex e-book structures.

Use it for

  • Extract all images and text from an existing EPUB file for processing or conversion to another format.
  • Programmatically generate EPUB e-books from structured data (e.g., converting Markdown or HTML content into a publishable e-book).
  • Modify e-book metadata, add chapters, or rebuild the table of contents in an existing EPUB file.
  • Build e-book generation pipelines that produce EPUB output as part of a larger publishing workflow.
  • Parse and validate EPUB file structure for quality assurance or compliance checking.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

EbookLib is a mature, actively maintained library with low install friction, no known vulnerabilities, and a clear use case for anyone working with EPUB files programmatically. The AGPL license is a significant consideration for proprietary projects, but poses no barrier for open-source work. Install it if you need to read, write, or manipulate EPUB files in Python.

Install

ebooklib on PyPI

Before you install

Low install friction with only two runtime dependencies (lxml and six). The project is actively maintained with a recent commit on 2026-07-27 and 1802 repository stars. Version 0.20 is marked as the final release supporting Python 2.7; future versions will drop legacy support.

License in practice

Licensed under AGPL, which requires that any modifications or derivative works using this library must also be released under AGPL. This is a copyleft license with stronger obligations than permissive licenses—suitable for open-source projects but may conflict with proprietary software licensing strategies.

Quickstart

from ebooklib import epub

# Read an EPUB file
book = epub.read_epub('test.epub')
for image in book.get_items_of_type(ebooklib.ITEM_IMAGE):
    print(image.get_name())

# Write an EPUB file
book = epub.EpubBook()
book.set_title('My Book')
epub.write_epub('output.epub', book)

Verify before relying

  • Whether the library handles all EPUB3 optional features (e.g., fixed layouts, media overlays, embedded fonts).
  • Performance characteristics when processing large EPUB files or batch operations.
  • Compatibility with non-standard or corrupted EPUB files in the wild.

Package facts

LicenseNot declared agpl
Python supportSupports the current Python release >=2.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
lxmlsix
MaintenanceActively maintained 292 days since the last release
Last repo commit
First released
Downloads1,309,072 / month, #4,077 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)Operating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Evidence: ebooklib-0.20-py3-none-any.whl

Tags

Capabilities
read write epub files pythonepub parser libraryebook format handlingepub2 epub3 supportprogrammatic ebook creationextract epub contentebook metadata management
Topics
epub-handlingebook-generation
PyPI keywords
ebookepub

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “read write epub files python”

  • EbookLibEbookLib reads and writes EPUB2/EPUB3 files programmatically,…
  • pypandoc-binarypypandoc_binary wraps pandoc, a universal document converter, and…
  • spire-docSpire.Doc creates, reads, modifies, and converts Word documents (DOC,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also jupyter-book · borb · pyexcel · aspose-words · docling · Sphinx · pyandoc · ar · docx · kvf