Skip to main content

Extralit
Extralit Server

Extract structured data from scientific literature with human validation

CI Codecov Downloads

This repository contains developer information about the backend server components. For general usage, please refer to our main repository or our documentation.

Source Code Structure

The server components are split into two main services:

/extralit_server
  /api # Core extraction API endpoints
    /handlers # FastAPI request handlers
    /schemas # Data models and validation
    /services # Business logic services
    /utils # Helper utilities
  /ml # Machine learning components
    /extractors # Document extraction models
    /ocr # OCR processing
    /pipeline # Extraction pipeline orchestration
  /storage # Data persistence layer
    /models # Database models
    /search # Search engine integration
    /vector # Vector store
/extralit_server
  /api # Annotation UI API endpoints
    /handlers
    /schemas
  /models # Database models
  /auth # Authentication
  /tasks # Background jobs

Development Environment

The development environment uses Docker Compose to run all required services. Key commands:

# Start all services
docker-compose up -d

# Install dependencies
uv sync --dev

# Run server in dev mode
uv run uvicorn extralit_server:app --host 0.0.0.0 --port 6900 --reload

# Run tests
uv run pytest tests

# Format and lint
uv run ruff format
uv run ruff check

Key Components

FastAPI Servers

  • Extraction Server: Handles document processing, extraction pipeline, and ML model serving
  • Annotation Server: Manages UI, data validation workflow, and user collaboration

Databases

  • PostgreSQL: Main database for user data, annotations, and metadata
  • Elasticsearch: Vector store for semantic search and document indexing
  • Weaviate: Vector database for table and section embeddings

Background Processing

Uses Celery for asynchronous tasks like:

  • Document OCR and preprocessing
  • ML model inference
  • Batch extraction jobs
  • Data export

CLI Commands

Key management commands:

# Database management
python -m extralit_server db migrate
python -m extralit_server db create-user

# Start servers
python -m extralit_server start
python -m extralit_server start

# Run workers
python -m extralit_server worker

See full CLI documentation in our developer docs.

Running Tests

The pytest suite is primarily designed to run in the CI environment using GitHub Actions as defined in .github/workflows/extralit-server.yml. This workflow sets up the necessary dependencies including Elasticsearch, PostgreSQL, Redis, and Minio.

Note that some tests are specifically skipped when running locally due to differences between the CI environment and local development environments. These tests may involve:

  • Search engine dynamics (Elasticsearch/OpenSearch compatibility)
  • File storage operations with Minio
  • Authentication and permission checks

To run tests in CI, create a pull request to trigger the test workflow.

If you need to run a specific test locally for debugging purposes, you can use:

cd extralit-server
python -m pytest [test_path] -v

However, expect some tests to fail or be skipped when running locally.

Contributing

Check our contribution guide and join our Slack community.

Roadmap

See our development roadmap and share your ideas!

Metadata

Release files for extralit-server 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for extralit-server 0.8.0
File Size Uploaded Provenance Actions
extralit_server-0.8.0.tar.gz 17.9 MB Without provenance Details for extralit_server-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for extralit-server 0.8.0
File Interpreter ABI Platform Actions
extralit_server-0.8.0-py3-none-any.whl Python 3 none any Details for extralit_server-0.8.0-py3-none-any.whl

Total release size: 35.3 MB

Release files / extralit_server-0.8.0.tar.gz

Download URL extralit_server-0.8.0.tar.gz
Size 17.9 MB
Tags Source
SHA-256 checksum
How to use checksums
1dce3dcf6997f279be21be152ae8dcf1b34c9cdd09c18c82f3e7de48c962f95e
BLAKE2b-256 checksum
How to use checksums
15a5dd96a4106ee5764931fa64977824386783748f86465337bcfcac9193f96a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / extralit_server-0.8.0-py3-none-any.whl

Download URL extralit_server-0.8.0-py3-none-any.whl
Size 17.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a5964b27933663769c9a36784a5789fc9bbb5b8d15c236925e7adceca486b87a
BLAKE2b-256 checksum
How to use checksums
af01747315408db7acff696c5233b4bc66a61641cc8602791617c6a53fccd105
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for extralit-server 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page