Skip to main content

Capybre

Tests Documentation Status PyPI version

Thin python wrapper over (some of) the Calibre CLI. Can be used for ebook conversion, metadata-extraction, and metadata-lookup:

Simple Usages

# convert between formats; creates 'PrideAndPrejudice.mobi'

from capybre import convert

convert('PrideAndPrejudice.epub', as_ext='mobi')


# extract metadata 
from capybre import extract_metada

metadata = extract_metadata('PrideAndPrejudice.epub')

# prints "Pride and Prejudice"
print(metadata.title)


# extract cover from metadata; saves as cover.jpg
from capybre import extract_cover

extract_cover('PrideAndPrejudice.epub', output_file='cover.jpg')


# fetch metadata from internet sources
from capybre import fetch_metadata

metadata = fetch_metadata(title='Pride and Prejudice')

# prints Jane Austen
print(metadata.author)


# download cover from internet sources; saves as cover.jpg
from capybre import fetch_cover

fetch_cover(title='Pride and Prejudice')

Getting Started

First, you need to download Calibre's command line tools.

You can follow instructions on Calibre's site to download, or download through package managers:

# on Ubuntu
sudo apt-get install calibre

# on MacOS
brew install calibre

On MacOS, the command line tools may not be added to your path. To access them, add /Applications/calibre.app/Contents/MacOS/ to your PATH variable, for instance in ~/.bashrc adding

export PATH=$PATH:/Applications/calibre.app/Contents/MacOS/

Then, just install Capybre with pip!

pip install capybre

See the full documentation at https://capybre.readthedocs.io/

Metadata

Release files for capybre 0.0.6

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

Source distribution (sdist)

Source distribution for capybre 0.0.6
File Size Uploaded Provenance Actions
capybre-0.0.6.tar.gz 7.9 kB Without provenance Details for capybre-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for capybre 0.0.6
File Interpreter ABI Platform Actions
capybre-0.0.6-py3-none-any.whl Python 3 none any Details for capybre-0.0.6-py3-none-any.whl

Total release size: 17.9 kB

Release files / capybre-0.0.6.tar.gz

Download URL capybre-0.0.6.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6db4c83b363b0546499306f194b2de60d88d13842c876d1d97050dea97802b85
BLAKE2b-256 checksum
How to use checksums
75f86daf6253df2bc4475a199a31db0c6e7b4ff6d3337c45bfd9e2543ae3d3d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.11

Release files / capybre-0.0.6-py3-none-any.whl

Download URL capybre-0.0.6-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b10f6d8b979ac4dc9b6e75ffd331c2f88295e9bf13a9cc530ab21d2269993991
BLAKE2b-256 checksum
How to use checksums
2b83d16a3bc9b167fe008a199717393fb0139c8a54668b6ced0eab0086ab34ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.6.11

Security for capybre 0.0.6

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

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