Skip to main content

ebook-converter-lib

ebook-converter-lib is a Python library and command-line tool for converting ebooks between common formats. It is a modified fork of ebook-converter by gryf, which is itself derived from the conversion components of Calibre. Licensed under GPL-3.0-or-later.

Install

python -m pip install ebook-converter-lib

Python 3.11 or newer is required. PDF conversion also requires Poppler tools (pdftohtml, pdfinfo, and pdftoppm) available on PATH.

Use as a library

from ebook_converter_lib import convert

result = convert("book.docx", "book.epub")
if not result["success"]:
    raise RuntimeError(result["message"])

convert() returns a dictionary with success and message keys. Additional arguments use the command-line option format:

convert("book.epub", "book.mobi", "--base-font-size", "12")

Use check_deps_str() to verify that conversion dependencies can load in an embedded Python runtime.

Command line

ebook-converter book.docx book.epub

Supported formats

Input: azw, azw3, azw4, cbc, cbr, cbz, chm, djv, djvu, docm, docx, epub, fb2, fbz, htm, html, htmlz, lrf, markdown, md, mobi, odt, opf, pdb, pdf, pobi, prc, rtf, shtm, shtml, text, textile, txt, txtz, updb, xhtm, xhtml.

Output: azw3, docx, epub, fb2, html, htmlz, lrf, mobi, oeb, txt, txtz.

The output format is chosen from the output file extension.

Development

uv sync --group dev
uv run pytest

Metadata

Release files for ebook-converter-lib 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ebook-converter-lib 1.0.1
File Size Uploaded
ebook_converter_lib-1.0.1.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for ebook-converter-lib 1.0.1
File Interpreter ABI Platform
ebook_converter_lib-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / ebook_converter_lib-1.0.1.tar.gz

Download URL ebook_converter_lib-1.0.1.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
5310e9fd53f16336193b1918162d5c48fba56e4f4ff82f3017dba55b93098447
BLAKE2b-256 checksum
How to use checksums
d6a188d51cdb2399fc925af9bc5fd63bc1f87f87fa30d4e21f567f181336ef56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 29, 2026.

Transparency log

Release files / ebook_converter_lib-1.0.1-py3-none-any.whl

Download URL ebook_converter_lib-1.0.1-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1c5799684d4dfea1f41f4cee0caff8c7e3e2207b81c9bf1d5d467b40a454b215
BLAKE2b-256 checksum
How to use checksums
80731c43c36f4aabdb3fbb4497fea137e899be1c74811b26fb87d6f112ba1217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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