django-bookkeeper
A Django app for storing, cataloguing, and reading e-Books (PDF, EPUB, CBZ).
Features
- Upload PDF, EPUB, and CBZ files (drag-and-drop or browse)
- Automatic metadata extraction — title, author, publisher, cover image
- Deduplication by SHA-256 hash
- Modern reader with:
- Reader settings: light/sepia/dark themes, font family & size, line height, column width
- Highlights in five colours with optional notes
- Bookmarks with titles and notes
- Reading progress — auto-saved position and percentage
- 5-star ratings per user
- Favourites and finished-book tracking
- Extensible hook signals for recent-books lists, activity feeds, etc.
- PWA-installable — add to your home screen on iOS and Android for a full-screen, standalone reading app
- Django best-practices:
django-storagescompatible,AUTH_USER_MODELaware, namespaced URLs
Screenshots
Try the demo
The fastest way to see Bookkeeper in action — one command downloads five public-domain classics from Project Gutenberg and starts a local server:
git clone https://github.com/ehwio/django-bookkeeper
cd django-bookkeeper
make demo
Then open http://127.0.0.1:8000/ and sign in as demo / demo.
On subsequent runs, use
make demo-runto start the server without re-seeding. Usemake demo-resetto wipe the database and media and re-seed from scratch.
Admin interface: after seeding, create an admin account to access /admin/:
cd demo
PYTHONPATH=../src:.. uv run python manage.py create_admin
Then visit http://127.0.0.1:8000/admin/ and sign in with your admin credentials.
Or with Docker:
docker compose up
Uses
Dockerfile.demo— builds the demo image from thedemo/directory.
The demo ships with:
- Pride and Prejudice — Jane Austen
- Twenty Thousand Leagues Under the Seas — Jules Verne
- The Time Machine — H.G. Wells
- Alice's Adventures in Wonderland — Lewis Carroll
- Frankenstein — Mary Wollstonecraft Shelley
Books are downloaded from Project Gutenberg on first run. They are public domain and freely distributable.
Progressive Web App (PWA)
Bookkeeper can be installed on your device's home screen for a full-screen, app-like experience with no browser chrome. On supported browsers, look for the Share → Add to Home Screen (iOS) or Install app option.
This requires no service worker — the manifest and meta tags enable the A2HS flow; offline reading is a future enhancement.
Installation
pip install django-bookkeeper
# or
uv add django-bookkeeper
Add to INSTALLED_APPS:
INSTALLED_APPS = [
...
"bookkeeper",
]
Include URLs:
# urls.py
from django.urls import include, path
urlpatterns = [
path("books/", include("bookkeeper.urls", namespace="bookkeeper")),
]
Run migrations:
python manage.py migrate
Dependencies
django-bookkeeper requires Django 4.2 or later and uses these packages:
| Package | Purpose |
|---|---|
django-storages |
Storage backend abstraction |
Pillow |
Image processing (covers) |
ebooklib |
EPUB metadata/structure extraction |
PyMuPDF |
PDF text/metadata extraction |
python-magic |
File type detection |
beautifulsoup4 |
HTML/XML parsing |
lxml |
Fast XML/HTML processing |
rarfile |
CBR comic support |
Optional dependencies
| Feature | Package / Requirement |
|---|---|
| Social login | social-auth-app-django |
| CBR comic support | system unrar or unar binary |
| Cloud storage | Already included — django-storages is a required dependency |
Hooks
Connect to Bookkeeper signals to extend behaviour:
from bookkeeper.hooks import book_opened, book_finished, progress_updated
@book_opened.connect
def track_recent(sender, user, book, **kwargs):
RecentBook.objects.update_or_create(user=user, defaults={"book": book})
Available signals: book_opened, progress_updated, book_finished, book_rated,
book_uploaded, highlight_created, bookmark_created.
Development
git clone https://github.com/ehwio/django-bookkeeper
cd django-bookkeeper
uv sync --extra dev
uv run pytest --cov
uv run ruff check src/ tests/ demo/
GitFlow
main— stable releasesdevelop— integration branchfeature/*— new featuresfix/*— bug fixesrelease/*— release prep
See RELEASING.md for the step-by-step release process (TestPyPI → PyPI via GitHub Actions).
License
MIT
Metadata
Release files for django-bookkeeper 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_bookkeeper-0.4.0.tar.gz | 8.9 MB | With provenance | Details for django_bookkeeper-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_bookkeeper-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for django_bookkeeper-0.4.0-py3-none-any.whl |
Total release size: 8.9 MB
Release files / django_bookkeeper-0.4.0.tar.gz
| Download URL | django_bookkeeper-0.4.0.tar.gz |
|---|---|
| Size | 8.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c69436f62a908afa48edd4308b576ecfb9f502f0feb82f9bbbb84edf36064a89
|
|
BLAKE2b-256 checksum How to use checksums |
ae4edb43da6b05e93bd51f3300c6160bfe3abbd86a84e7d7405449a28c29885c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logRelease files / django_bookkeeper-0.4.0-py3-none-any.whl
| Download URL | django_bookkeeper-0.4.0-py3-none-any.whl |
|---|---|
| Size | 66.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5554d8429f642157eb6dd2aabc540c336e184fa2bc90a5a73801ceaa63e0269f
|
|
BLAKE2b-256 checksum How to use checksums |
3e1c975d27c47c9c7c9442ac85b8cf53c1ec331da7de53ae7e4d103863d6ed7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logSecurity for django-bookkeeper 0.4.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for django_bookkeeper-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 22, 2026.
Transparency logA 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.