Open-source tool for accurate & fast scientific literature data extraction with LLM and human-in-the-loop.
Project description
Extralit Server
Extract structured data from scientific literature with human validation
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
# Run server in dev mode
pdm run dev
# Run tests
pdm test
# Format and lint
pdm format
pdm lint
# Run all checks
pdm all
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!
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 extralit_server-0.6.1.tar.gz.
File metadata
- Download URL: extralit_server-0.6.1.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.9 CPython/3.13.7 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff00d068cb506b1c383f299b09a9a7ae09310306266e98094e85ba7e8e9fb68f
|
|
| MD5 |
e7f4926bcad9a445815b6e4ba3510119
|
|
| BLAKE2b-256 |
9475e45206e9ee0870a8172cf79360116a69d1ed6f89b22093fc9c47411cb435
|
File details
Details for the file extralit_server-0.6.1-py3-none-any.whl.
File metadata
- Download URL: extralit_server-0.6.1-py3-none-any.whl
- Upload date:
- Size: 5.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.9 CPython/3.13.7 Linux/6.11.0-1018-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4d16099787fbb8ec50046560c494bd26cd097f7d33fe46426c409f8534728df
|
|
| MD5 |
2aecd7bb1b63cc5e64975709e39f5cb6
|
|
| BLAKE2b-256 |
c32d55c3db6c255ab8e65107f167e5873b14cf8cf0f2799000ce8568c0b1c819
|