Skip to content

trejosoftdo/qms-kiosk-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QMS Kiosk API

linting: pylint Build Status

Table of Contents

Overview

The API for the QMS Kiosk Application.

Requirements

  • Python 3.7+
  • Install dependencies using pip install -r requirements.txt

Installation

  1. Clone the repository

  2. Create a virtual environment

python -m venv venv
  1. Activate the virtual environment
  • On Windows:
venv\Scripts\activate
  • On Unix or MacOS:
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Run the setup file:
./setup.sh

Environment Variables

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:

AUTH_API_BASE_URL

  • Description: Base url of the API for authentication.
  • Example:
    AUTH_API_BASE_URL=http://localhost:1234
    

APP_CLIENT_ID

  • Description: Client ID of the APP for authentication.
  • Example:
    APP_CLIENT_ID=test-client-id
    

APP_CLIENT_SECRET

  • Description: Client Secret of the APP for authentication.
  • Example:
    APP_CLIENT_SECRET=test-client-secret
    

IAM_API_KEY

  • Description: API key to be able to consume the IAM API
  • Example:
    IAM_API_KEY=test-iam-api-key
    

CORE_API_KEY

  • Description: API key to be able to consume the Core API
  • Example:
    CORE_API_KEY=test-core-api-key
    

CORE_API_BASE_URL

  • Description: Base url of the core API.
  • Example:
    CORE_API_BASE_URL=http://localhost:5432
    

TEST_AUTH_APPLICATION

  • Description: Auth API application for testing
  • Example:
    TEST_AUTH_APPLICATION=test-auth-application
    

TEST_AUTH_USERNAME

  • Description: Auth API user name for testing
  • Example:
    TEST_AUTH_USERNAME=test-auth-username
    

TEST_AUTH_PASSWORD

  • Description: Auth API user password for testing
  • Example:
    TEST_AUTH_PASSWORD=test-auth-password
    

Running the Application

Run the FastAPI application:

make start

The API will be accessible at http://localhost:5000.

API Documentation

Swagger UI: http://127.0.0.1:5000/docs

Linting

Run the linting on the code using:

make lint

Testing

Run the unit tests using:

make unit-tests

Run the integration tests using:

make integration-tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages