Skip to content

AtomInnoLab/openalex-elastic-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAlex API

This is the elasticsearch-backed portion of the OpenAlex API.

Please send all bug reports and feature requests to support@openalex.org.

Development Setup

Prerequisites

  • Python 3.10+
  • Conda environment manager
  • Elasticsearch (for local development)

Quick Start with VSCode

  1. Select Conda Environment:

    • Open the project in VSCode
    • Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open command palette
    • Type "Python: Select Interpreter" and select it
    • Choose the openalex-api conda environment from the list
  2. Install Dependencies:

    conda activate openalex-api
    pip install -r requirements.txt
  3. Run the Application:

    • Option 1: Use VSCode debugger (F5) with pre-configured launch options
    • Option 2: Run directly with Python:
      python start_dev.py
    • Option 3: Run the app module:
      python -m app
  4. Access the API:

Environment Variables

The application requires several environment variables for proper operation. These are pre-configured in the VSCode launch configurations for development.

Testing

# Install development dependencies
pip install -r requirements/dev.txt

# Run tests
pytest

# Run with coverage
pytest --cov=.

# Run specific test file
pytest tests/functional/test_works_standard_filters.py

Docker Development (Alternative)

# Start Redis cache
make cache-up

# Start test environment
make test-up

# View Kibana (if Elasticsearch is running)
make kibana

Production Deployment

The application uses Gunicorn for production deployment as configured in Procfile.

About

All the OpenAlex API endpoints that are backed by Elasticsearch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.7%
  • Shell 1.2%
  • Other 0.1%