Skip to content
Snippets Groups Projects
README.md 1.06 KiB
Newer Older
  • Learn to ignore specific revisions
  • David Trattnig's avatar
    David Trattnig committed
    # Engine API Server
    
    David Trattnig's avatar
    David Trattnig committed
    
    ## Overview
    
    
    David Trattnig's avatar
    David Trattnig committed
    The Project serves the Engine API and handles state management of multiple Engine instances.
    
    This project is based on a swagger-enabled Flask server using an *API First* approach. It also uses the [Connexion](https://github.com/zalando/connexion) library on top of Flask.
    
    David Trattnig's avatar
    David Trattnig committed
    
    ## Requirements
    
    David Trattnig's avatar
    David Trattnig committed
    
    
    David Trattnig's avatar
    David Trattnig committed
    Python 3.7+
    
    David Trattnig's avatar
    David Trattnig committed
    
    
    David Trattnig's avatar
    David Trattnig committed
    ## Getting started
    
    
    David Trattnig's avatar
    David Trattnig committed
    To run the server, please execute the following from the root directory:
    
    ```
    pip install -r requirements.txt
    python -m src
    ```
    
    
    David Trattnig's avatar
    David Trattnig committed
    this runs the API in an local development server. You can access the interactive documentation here:
    
    David Trattnig's avatar
    David Trattnig committed
    
    ```
    http://localhost:8008/AURA-Engine/engine-api/1.0.0/ui/
    ```
    
    
    David Trattnig's avatar
    David Trattnig committed
    The OpenAPI 3 specification lives here:
    
    David Trattnig's avatar
    David Trattnig committed
    
    ```
    http://localhost:8008/AURA-Engine/engine-api/1.0.0/swagger.json
    ```
    
    
    David Trattnig's avatar
    David Trattnig committed
    ## Testing
    
    
    David Trattnig's avatar
    David Trattnig committed
    To launch the integration tests, use tox:
    ```
    sudo pip install tox
    tox
    ```
    
    ## Running with Docker
    
    To run the server on a Docker container, please execute the following from the root directory:
    
    ```bash
    # building the image
    docker build -t src .
    
    # starting up a container
    docker run -p 8008:8008 src
    ```