This project demonstrates Python REST API capabilities.
- Execute following command to create new virtual environment (Mandatory)
sudo pip install virtualenv
- Then execute below command to create new venv folder (You can use any name)that stores libraries
virtualenv venv
- Then execute below command to activate the Python Shell
source venv/bin/activate
- Configure DB credentials here
- And create database employees and table customers with the following commands
create database if not exists employees;
create table if not exists employees.customers
(
name varchar(40) null,
address varchar(200) null
);
- Go to com/demo/web/CustomersController.py and run the project
- Go to http://127.0.0.1:5000 to see list of customers
- Create new customer using the URL http://127.0.0.1:5000/create