Skip to main content

Library prototyping based on Calibre.

Project description

Repository license PyPI package Travis CI result Documentation status Support badge

Library prototyping based on Calibre

Calibrestekje is a Python library which provides a way to work with the Calibre database outside the context of the Calibre desktop and web interfaces. A set of generated SQLAlchemy bindings (see sqlacodegen for more) are provided which allow for the read/write access to an existing Calibre metadata database (a file typically called metadata.db). These bindings are more fine grained than Calibres database interface and provide direct access to the Database table layer.

Quick Example

See documentation linked below for more.

from calibrestekje import Book, Publisher, init_session

session = init_session("sqlite:///mymetadata.db")

publisher = (session.query(Publisher)
                    .filter(Publisher.name == "MIT Press").one())

books = (session.query(Book)
                .filter(Book.publishers.contains(publisher)))

print(f"Books published by MIT Press: {books.count()}")

Documentation

Mirroring

Project details


Download files

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

Source Distribution

calibrestekje-0.0.1.tar.gz (24.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page