Self-hosted PDF extraction backend for the Estravon Zotero plugin
Project description
estravon-backend
Self-hosted PDF extraction backend for the Estravon Zotero plugin.
Independent project. Estravon is not affiliated with, endorsed by, or in any way connected to the Zotero project or the Corporation for Digital Scholarship. Zotero is a registered trademark of the Corporation for Digital Scholarship.
Extracts nominated sections of a book PDF to Markdown and attaches the result directly to the Zotero item — synced, versioned, always co-located with the source.
Just want to run it? Skip this page — follow the step-by-step guide at
estravon.com/install instead. It covers pip install,
virtual environments, and .env configuration without requiring a clone.
This README is for people who want to read the source, modify the backend, or run in editable mode.
Developer setup
git clone https://github.com/tiberavonltd/estravon-backend.git
cd estravon-backend
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
Create a .env file in the repo root and add your API key:
MISTRAL_API_KEY=your_key_here
Get a key at console.mistral.ai (~$0.002/page).
Start the backend:
estravon --port 7766
Run the test suite:
pytest
Supported extraction backends
| Backend | Pricing | .env config |
|---|---|---|
| Mistral OCR | ~$0.002/page, pay-as-you-go | MISTRAL_API_KEY=... (default) |
| Datalab | $25/month flat | DATALAB_API_KEY=... + _ZM_BACKEND=datalab |
| Replicate | Pay-as-you-go | REPLICATE_API_TOKEN=... + _ZM_BACKEND=replicate |
Architecture
Zotero plugin → POST /process → run_extraction()
↓
MistralBackend | DatalabBackend | ReplicateBackend
↓
result .md + images returned
The backend is a single-process FastHTML server. One job runs
at a time; the plugin polls GET /jobs/{id} until the result is ready.
GET /status exposes the current server state (idle / running / error).
Health check
curl http://localhost:7766/ping
# {"status":"ok","state":"idle","backend":"mistral"}
curl http://localhost:7766/status
# {"state":"idle","state_since_s":4.1,"backend":"mistral","last_job":{}}
Links
License
AGPL-3.0 — the same license as Zotero itself.
Project details
Release history Release notifications | RSS feed
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 estravon_backend-0.1.6.tar.gz.
File metadata
- Download URL: estravon_backend-0.1.6.tar.gz
- Upload date:
- Size: 26.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78ef0d368b26b10274ef56acb6bdd872cee311a7718ea6c5ac438f26ee873001
|
|
| MD5 |
186bf64f03016d340aba9ffbfcfe01b5
|
|
| BLAKE2b-256 |
c2c7da5f3b634928d027af63a796e90e99ba8616c5e9a9d7f9c1e7ed4c48bbfe
|
Provenance
The following attestation bundles were made for estravon_backend-0.1.6.tar.gz:
Publisher:
publish.yml on tiberavonltd/estravon-backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
estravon_backend-0.1.6.tar.gz -
Subject digest:
78ef0d368b26b10274ef56acb6bdd872cee311a7718ea6c5ac438f26ee873001 - Sigstore transparency entry: 1986957104
- Sigstore integration time:
-
Permalink:
tiberavonltd/estravon-backend@df87fd622ae6c61c49ff83b66c26d4f1abe8c1c6 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/tiberavonltd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@df87fd622ae6c61c49ff83b66c26d4f1abe8c1c6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file estravon_backend-0.1.6-py3-none-any.whl.
File metadata
- Download URL: estravon_backend-0.1.6-py3-none-any.whl
- Upload date:
- Size: 29.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 |
e286dccae9dcbec7933f2655640d7102434186344f65f66d9ae98718b555c431
|
|
| MD5 |
b86c6b23e15e60a0306dbd0ccd2d9b88
|
|
| BLAKE2b-256 |
ebff7f1c9d7cc97693fae82ae8a0c2fce5a51fd74b211eb31b6fb914eca2c227
|
Provenance
The following attestation bundles were made for estravon_backend-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on tiberavonltd/estravon-backend
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
estravon_backend-0.1.6-py3-none-any.whl -
Subject digest:
e286dccae9dcbec7933f2655640d7102434186344f65f66d9ae98718b555c431 - Sigstore transparency entry: 1986957274
- Sigstore integration time:
-
Permalink:
tiberavonltd/estravon-backend@df87fd622ae6c61c49ff83b66c26d4f1abe8c1c6 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/tiberavonltd
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@df87fd622ae6c61c49ff83b66c26d4f1abe8c1c6 -
Trigger Event:
push
-
Statement type: