Skip to main content

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.

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.7.tar.gz (27.2 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.7-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file estravon_backend-0.1.7.tar.gz.

File metadata

  • Download URL: estravon_backend-0.1.7.tar.gz
  • Upload date:
  • Size: 27.2 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.7.tar.gz
Algorithm Hash digest
SHA256 1a3f32ae948d5796fbb2113e50c9b7d9f341982eed7ffb98cdf74bd1acd51b08
MD5 66288bbda926fff9a52dc34430a52bb1
BLAKE2b-256 7cc5b28ee143278a2bf6a61b6452bdfb49c98278724d8e47124202a0024fee6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for estravon_backend-0.1.7.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.7-py3-none-any.whl.

File metadata

File hashes

Hashes for estravon_backend-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 7ecdd356396ba6f2dd4afda19e285fdcc8025ffd4dac68fd98bd44ab942d2196
MD5 e06d12c2caff1eef6b2bb82cf7bcdbd4
BLAKE2b-256 c684ccad0b588eca748132960d7f223863294bf5550d4a57a834cb45221d262d

See more details on using hashes here.

Provenance

The following attestation bundles were made for estravon_backend-0.1.7-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 Sentry Error logging StatusPage Status page