Library prototyping based on Calibre https://calibrestekje.readthedocs.io
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Luke Murphy 0881086e6a
Add new line
4 weeks ago
calibrestekje Enable writing to the DB 1 month ago
changelog Generate new changelog 1 month ago
docs Add new line 4 weeks ago
test Get tests and docs passing 1 month ago
.gitignore Add ignore for test dbs 1 month ago
.readthedocs.yml Bootstrap calibrestekje 1 month ago
.travis.yml Bootstrap calibrestekje 1 month ago
CHANGELOG.rst Add missing full stop 1 month ago
CODE_OF_CONDUCT.rst Wrap CoC 1 month ago
CONTRIBUTING.rst Bootstrap calibrestekje 1 month ago
LICENSE Bootstrap calibrestekje 1 month ago
MANIFEST.in Bootstrap calibrestekje 1 month ago
README.rst Move version to intro 4 weeks ago
mypy.ini Add mypy bindings for sqlalchemy 1 month ago
pyproject.toml Add py38 and quote 1 month ago
setup.cfg Avoid this extra work 1 month ago
setup.py Bootstrap calibrestekje 1 month ago
tox.ini Get tests and docs passing 1 month ago

README.rst

calibrestekje

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()}")