Library prototyping based on Calibre
Go to file
decentral1se 0af5e63d4b
chore: inline badges
2023-05-29 18:04:02 +02:00
calibrestekje Enable writing to the DB 2020-02-29 23:24:43 +00:00
changelog Generate new changelog 2020-03-01 02:09:55 +00:00
docs Add new line 2020-03-01 16:40:48 +00:00
test Get tests and docs passing 2020-02-29 23:52:18 +00:00
.gitignore Add ignore for test dbs 2020-02-28 10:51:58 +00:00
.readthedocs.yml Bootstrap calibrestekje 2020-02-26 19:40:03 +01:00
.travis.yml Bootstrap calibrestekje 2020-02-26 19:40:03 +01:00
CHANGELOG.md chore: rst -> md 2023-05-29 18:03:31 +02:00
CONTRIBUTING.md chore: rst -> md 2023-05-29 18:03:31 +02:00
LICENSE Bootstrap calibrestekje 2020-02-26 19:40:03 +01:00
MANIFEST.in chore: rst -> md 2023-05-29 18:03:31 +02:00
README.md chore: inline badges 2023-05-29 18:04:02 +02:00
mypy.ini Add mypy bindings for sqlalchemy 2020-02-27 17:57:31 +00:00
pyproject.toml chore: rst -> md 2023-05-29 18:03:31 +02:00
setup.cfg chore: rst -> md 2023-05-29 18:03:31 +02:00
setup.py Bootstrap calibrestekje 2020-02-26 19:40:03 +01:00
tox.ini Get tests and docs passing 2020-02-29 23:52:18 +00:00

README.md

calibrestekje

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.

Generated SQLAlchemy database bindings (see sqlacodegen for more) are provided which allow for read/write access to an existing Calibre database. These bindings are more fine grained than Calibres database interface and provide direct access to the Database table layer. The bindings are generated from Calibre version 2.75.1.

A flask extension is also provided for getting started with web prototyping. Please see flask-calibrestekje and the flask usage documentation for more.

Quick Example

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