Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

yael (Yet Another EPUB Library) is a Python library for reading, manipulating, and writing EPUB 2/3 files.

Project Description

yael (Yet Another EPUB Library) is a Python library for reading, manipulating, and writing EPUB 2/3 files.

This library is currently in development. The reading part is essentially complete, while the editing/writing is missing. Please do NOT use this code in production until it reaches v1.0.0.

Feedback (especially on the lib interface) is welcome at any version number! (Please use the GitHub issue tracker.)


from yael import SimpleEPUB

ebook = SimpleEPUB(path="/tmp/bierce01.epub")

ebook.manifestation # 'compressed'
ebook.size # 7281362
ebook.version # '3.0'
ebook.unique_identifier # 'urn:uuid:2722b0eb-a4f9-4b05-97f9-9123381e58b3'
ebook.release_identifier # 'urn:uuid:2722b0eb-a4f9-4b05-97f9-9123381e58b3@2014-06-06T00:00:01Z'
ebook.title # 'A Horseman In The Sky'
ebook.language # 'en' # 'Ambrose Bierce' # '2014-06-06'
ebook.description # 'This Audio-eBook was crafted by ReadBeyond ...'
ebook.publisher # 'ReadBeyond'
ebook.internal_path_cover_image # 'OEBPS/Images/cover.png'

# print a JSON string representation

# print the TOC with resolved paths

# print the spine
for i_p_spine_item in ebook.resolved_spine:

# extract cover image to /tmp/extracted_cover.jpg
cover_image = ebook.cover_image
if cover_image != None:
    output_file = open("/tmp/extracted_cover.jpg", "wb")
    print("Cover image extracted to '/tmp/extracted_cover.jpg' ...")

See `yael/examples/ <yael/examples/>`__, `yael/examples/ <yael/examples/>`__, and `yael/examples/ <yael/examples/>`__ for more complex, commented examples.



Generated from the source (requires sphinx):

$ git clone
$ cd yael/docs
$ make html


yael is released under the terms of the MIT License. See the LICENSE file.

Supported Features

Parsing nearly all of EPUB 2 and 3 OCF/OPF specifications, including:

  • EPUB 2 <meta> and <guide> OPF elements
  • EPUB 3 <meta> (including refines)
  • EPUB 3 Media Overlays (SMIL files)
  • EPUB 3 Navigation Document (including <nav> elements other than toc and landmarks)
  • EPUB 3 Multiple Renditions
  • Asset obfuscation with either Adobe or IDPF algorithms

Other useful stuff:

  • Loadind/saving publications in compressed, uncompressed, or in-memory form
  • Retrieving viewport information from Content Documents in FXL EPUB files
  • Building sub-objects from strings
  • Outputting a JSON representation of any object
  • Resolution of MARC Relator values
  • Conversion of SMIL clip times from string to seconds

Limitations and Missing Features

  • EPUB OCF elements not parsed: manifest.xml, rights.xml, signatures.xml
  • EPUB 3 OPF elements not parsed: <bindings>, <collection>
  • No EPUB CFI support
  • No editing of SVG Content Documents

Similar Libraries


Many thanks to:

  • Yael, of course.

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
yael-0.0.9.tar.gz (47.0 kB) Copy SHA256 Checksum SHA256 Source Mar 4, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting