Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

estravon_backend-0.1.6.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

estravon_backend-0.1.6-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

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

Hashes for estravon_backend-0.1.6.tar.gz
Algorithm Hash digest
SHA256 78ef0d368b26b10274ef56acb6bdd872cee311a7718ea6c5ac438f26ee873001
MD5 186bf64f03016d340aba9ffbfcfe01b5
BLAKE2b-256 c2c7da5f3b634928d027af63a796e90e99ba8616c5e9a9d7f9c1e7ed4c48bbfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for estravon_backend-0.1.6.tar.gz:

Publisher: publish.yml on tiberavonltd/estravon-backend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file estravon_backend-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for estravon_backend-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e286dccae9dcbec7933f2655640d7102434186344f65f66d9ae98718b555c431
MD5 b86c6b23e15e60a0306dbd0ccd2d9b88
BLAKE2b-256 ebff7f1c9d7cc97693fae82ae8a0c2fce5a51fd74b211eb31b6fb914eca2c227

See more details on using hashes here.

Provenance

The following attestation bundles were made for estravon_backend-0.1.6-py3-none-any.whl:

Publisher: publish.yml on tiberavonltd/estravon-backend

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page