Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pavankjadda/pythonrestapi
Python REST API Project
https://github.com/pavankjadda/pythonrestapi
python python-rest
Last synced: 17 days ago
JSON representation
Python REST API Project
- Host: GitHub
- URL: https://github.com/pavankjadda/pythonrestapi
- Owner: pavankjadda
- Created: 2018-09-25T20:38:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-17T19:58:48.000Z (over 4 years ago)
- Last Synced: 2024-11-10T15:51:15.476Z (2 months ago)
- Topics: python, python-rest
- Language: Python
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python REST API Project
This project demonstrates Python REST API capabilities.
### Install Virtual Environment
1. Execute following command to create new virtual environment (**Mandatory**)
```
sudo pip install virtualenv
```
2. Then execute below command to create new **venv** folder (You can use any name)that stores libraries
```
virtualenv venv
```
3. Then execute below command to activate the Python Shell
```
source venv/bin/activate
```
### Set up DB
1. Configure DB credentials [here](com/demo/dao/CustomerDao.py)
2. 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
);
```## Run project
4. Go to [com/demo/web/CustomersController.py](com/demo/web/CustomersController.py) and run the project
5. Go to http://127.0.0.1:5000 to see list of customers
6. Create new customer using the URL http://127.0.0.1:5000/create