# Engine API Server

## Overview

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.

## Requirements

Python 3.7+

## Getting started

To run the server, please execute the following from the root directory:

```
pip install -r requirements.txt
python -m src
```

this runs the API in an local development server. You can access the interactive documentation here:

```
http://localhost:8008/api/v1/ui/
```

Your OpenAPI definition lives here:

```
http://localhost:8008/api/v1/openapi.json
```

## Testing

To launch the integration tests, use tox:
```
sudo pip install tox
tox
```

> Note, there are currently issues with the test environment, hence this doesn't work properly.

## 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
```