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

Uploaded Python 3

File details

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

File metadata

  • Download URL: estravon_backend-0.1.9.tar.gz
  • Upload date:
  • Size: 27.4 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.9.tar.gz
Algorithm Hash digest
SHA256 9508d55a053419dc9c95dc429d2113b75d29862eaefd0b8973d023e4d3f1a728
MD5 0819adfdbda51e91cd7137c4f1c01a90
BLAKE2b-256 ba76dfa9c7de69916b581a0caa80a89aa275e292d1b5b9894d0e8e38c579a24b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for estravon_backend-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 9223246212bee3d1c6969e4a2249eba5f416bc23ecce90ad16ad0dbff9dee66b
MD5 8a33eee43c31a5bea3367bee9c3c5c96
BLAKE2b-256 6105b5e7d9572c2431e59be48a4b8a3a5870c298bd0a6accd7a45e504370ea87

See more details on using hashes here.

Provenance

The following attestation bundles were made for estravon_backend-0.1.9-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