About EbookLib
EbookLib is a Python library for managing EPUB2/EPUB3 and Kindle files. It's capable of reading and writing EPUB files programmatically (Kindle support is under development).
The API is designed to be as simple as possible, while at the same time making complex things possible too. It has support for covers, table of contents, spine, guide, metadata and etc.
EbookLib is used in Booktype from Sourcefabric, as well as sprits-it!, fanfiction2ebook, viserlalune and Telemeta.
Packages of EbookLib for GNU/Linux are available in Debian and Ubuntu.
Sphinx documentation is generated from the templates in the docs/ directory and made available at http://ebooklib.readthedocs.io
Usage
Reading
::
import ebooklib
from ebooklib import epub
book = epub.read_epub('test.epub')
for image in book.get_items_of_type(ebooklib.ITEM_IMAGE):
print image