Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Latest commit

 

History

History
104 lines (66 loc) · 2.25 KB

CONFIGURATIONS.md

File metadata and controls

104 lines (66 loc) · 2.25 KB

Configurations

Table of contents

  1. Requirements
  2. Installation
  3. Setup

Requirements

Dependencies

On Ubuntu libmysqlclient-dev is required

sudo apt install python3-dev libmysqlclient-dev

Installation

Create a Virtual Environments (venv)

python3 -m venv venv

Move into Virtual Environments workspace

. venv/bin/activate

Install all python packages

python -m pip install -r requirements.txt

Setup

All configuration files are found in the .config directory.

Development configurations

default.ini is the default configuration file.

To set up Database and API, copy the template files "example.default.ini" and rename to "default.ini"

cp .config/example.default.ini .config/default.ini

Access configurations

setup.ini is the access configuration file.

To set up access, copy the template files "example.setup.ini" and rename to "setup.ini"

cp .config/example.setup.ini .config/setup.ini

Products configurations

products.ini is the products configuration file.

To set up products, copy the template files "example.products.ini" and rename to "products.ini"

cp .config/example.products.ini .config/products.ini

Add Products to database

New products are fetched from the product info.json file and added to the database the first time the server starts. Each product is an object in the info.json file and it's metadata contains:

  • name = The name of the Product
  • label = The Display name for the Product
  • description = The Product's description
  • documentation = The Product's documentation

How to use

Start API

python3 server.py

logger

python3 server.py --logs=debug

API SandBox

<host>:<PORT>/<VERSION>/api-docs/