- Overview
- Requirements
- Installation
- Environment Variables
- Running the Application
- API Documentation
- Linting
- Testing
The API for the QMS Kiosk Application.
- Python 3.7+
- Install dependencies using
pip install -r requirements.txt
-
Clone the repository
-
Create a virtual environment
python -m venv venv
- Activate the virtual environment
- On Windows:
venv\Scripts\activate
- On Unix or MacOS:
source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Run the setup file:
./setup.sh
In order to run this project, you need to set up the following environment variables. Create a .env
file under the /app directory of your project and add the necessary values:
- Description: Base url of the API for authentication.
- Example:
AUTH_API_BASE_URL=http://localhost:1234
- Description: Client ID of the APP for authentication.
- Example:
APP_CLIENT_ID=test-client-id
- Description: Client Secret of the APP for authentication.
- Example:
APP_CLIENT_SECRET=test-client-secret
- Description: API key to be able to consume the IAM API
- Example:
IAM_API_KEY=test-iam-api-key
- Description: API key to be able to consume the Core API
- Example:
CORE_API_KEY=test-core-api-key
- Description: Base url of the core API.
- Example:
CORE_API_BASE_URL=http://localhost:5432
- Description: Auth API application for testing
- Example:
TEST_AUTH_APPLICATION=test-auth-application
- Description: Auth API user name for testing
- Example:
TEST_AUTH_USERNAME=test-auth-username
- Description: Auth API user password for testing
- Example:
TEST_AUTH_PASSWORD=test-auth-password
Run the FastAPI application:
make start
The API will be accessible at http://localhost:5000.
Swagger UI: http://127.0.0.1:5000/docs
Run the linting on the code using:
make lint
Run the unit tests using:
make unit-tests
Run the integration tests using:
make integration-tests