Depending on what you want to do book-by-book, the API db.cache.(add_custom_book_data(), get_custom_book_data(), delete_custom_book_data(), and get_ids_for_custom_book_data()) might do the job. These let you store and retrieve more-or-less arbitrary data on a book-by-book basis. Internally calibre uses a table with three columns (book_id, data_name, data_val), where data_val is the json representation of the data.
You could store a python dict of your key:value pairs.
If needed, you could give users access to the data via Python stored templates. The template would load the dict and return the desired value(s).
|