A Django app for storing, cataloguing, and reading e-Books (PDF, EPUB, CBZ)
Project description
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.
- Django best-practices:
django-storagescompatible,AUTH_USER_MODELaware, namespaced URLs
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
uv sync
make demo
Then open http://127.0.0.1:8000/ and sign in as demo / demo.
Or with Docker:
docker compose up
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.
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
Optional dependencies
| Feature | Package / Requirement |
|---|---|
| Social login | django-social-auth-app-django |
| Cloud storage | django-storages |
| CBR comic support | system unrar or unar binary (rarfile is included automatically) |
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
uv run ruff check src/ tests/
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_bookkeeper-0.3.1.tar.gz.
File metadata
- Download URL: django_bookkeeper-0.3.1.tar.gz
- Upload date:
- Size: 123.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8395bf2929f069f72c4330b698217f8d1f0b01fe0531d107b8a7560ee61066ce
|
|
| MD5 |
8984d8824f09d710aae332570eb4c6ed
|
|
| BLAKE2b-256 |
97fdd9729f131a36bff44912774bc772403bc22c48e000cccc11995b0e4bd7d2
|
Provenance
The following attestation bundles were made for django_bookkeeper-0.3.1.tar.gz:
Publisher:
publish-pypi.yml on ehwio/django-bookkeeper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_bookkeeper-0.3.1.tar.gz -
Subject digest:
8395bf2929f069f72c4330b698217f8d1f0b01fe0531d107b8a7560ee61066ce - Sigstore transparency entry: 1883999355
- Sigstore integration time:
-
Permalink:
ehwio/django-bookkeeper@b308949f60662a927f6b8000b7db38077cb70bbb -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/ehwio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b308949f60662a927f6b8000b7db38077cb70bbb -
Trigger Event:
release
-
Statement type:
File details
Details for the file django_bookkeeper-0.3.1-py3-none-any.whl.
File metadata
- Download URL: django_bookkeeper-0.3.1-py3-none-any.whl
- Upload date:
- Size: 60.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63bc8a9f2f65b62ecd3f87d1fce044e99028aeddc0838784b2b30825ec0a661e
|
|
| MD5 |
11a661b9738b3080b20b6bc4c378c7ad
|
|
| BLAKE2b-256 |
223f1be39556ef505b3bca590bb45d7f12fb564d18db1b410f248c8c1905ba0f
|
Provenance
The following attestation bundles were made for django_bookkeeper-0.3.1-py3-none-any.whl:
Publisher:
publish-pypi.yml on ehwio/django-bookkeeper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
django_bookkeeper-0.3.1-py3-none-any.whl -
Subject digest:
63bc8a9f2f65b62ecd3f87d1fce044e99028aeddc0838784b2b30825ec0a661e - Sigstore transparency entry: 1883999429
- Sigstore integration time:
-
Permalink:
ehwio/django-bookkeeper@b308949f60662a927f6b8000b7db38077cb70bbb -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/ehwio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@b308949f60662a927f6b8000b7db38077cb70bbb -
Trigger Event:
release
-
Statement type: