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 input uses PDFium through pypdfium2
(installed automatically); no external tools are needed. Text, embedded images,
the outline as table of contents, title, author and a first-page cover are
taken from the PDF.
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. Use
check_deps_str() to verify that conversion dependencies can load in an
embedded Python runtime.
Options
Extra arguments use the command-line option format:
convert("book.epub", "book.mobi", "--base-font-size", "12")
--remove-text: one regular expression per line, every match is deleted. Escape special characters for literal text, e.g.C\+\+.- Unknown options, stray values and invalid regular expressions fail the conversion.
Command line
ebook-converter book.docx book.epub
Supported formats
Input: azw, azw3, 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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ebook_converter_lib-1.3.0.tar.gz | 1.5 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ebook_converter_lib-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.1 MB
Release files / ebook_converter_lib-1.3.0.tar.gz
| Download URL | ebook_converter_lib-1.3.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c63525faf002c52de80d588b6bfaf97dd9ad6ecb6c3e6a059e5d2a7b7c6ee7cd
|
|
BLAKE2b-256 checksum How to use checksums |
8888494f0446b608c7f64c4ba1b585a1fef70fee052e1b9cc23f1606ce23f111
|
| 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 logRelease files / ebook_converter_lib-1.3.0-py3-none-any.whl
| Download URL | ebook_converter_lib-1.3.0-py3-none-any.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26b490001e33e4e85403f10475ce37ae1e5bb28ab023aae1738762fdc787ed18
|
|
BLAKE2b-256 checksum How to use checksums |
416f3a048acbfb7ab54c1d3d3952de4a39df1d2bff78dc0222c08a34252f1cef
|
| 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 logSecurity for ebook-converter-lib 1.3.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.
Attestation for ebook_converter_lib-1.3.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 logA 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.