An open API service indexing awesome lists of open source software.

https://github.com/alx-xlx/rest-api

Serve your data to the public using REST API
https://github.com/alx-xlx/rest-api

flask-api python rest-api restful-api simple-app

Last synced: 9 months ago
JSON representation

Serve your data to the public using REST API

Awesome Lists containing this project

README

          


simple-rest-api


rest-api-license
rest-api-softwareheritage.org
GitHub repo size

Create a simple REST-API in python using Flask.

We will serve the data from [chinook.db](https://cdn.sqlitetutorial.net/wp-content/uploads/2018/03/chinook.zip) as an example, and use [sqlitebrowser](https://sqlitebrowser.org/dl/) software to view database in GUI

## 💼 Requirements
- Python
- pip
- npm (Optional)

## ⚙️ Installation
```py
# Automatic Install in Windows
install.bat
```
```py
# Manually Install in Windows
pip install flask
pip install flask-jsonpify
pip install flask-sqlalchemy
pip install flask-restful
npm install nodemon # Optional
pip install requests
pip install flask_cors
```

## 🏃 Run
```py
# nodemon will check for any files changes & auto restart the server
nodemon server.py
```

## 📈 `chinook.db` (sqlite3)

![](https://i.imgur.com/ULWHETj.png)

## Example

http://127.0.0.1:5000/employees/1


simple-rest-api-python-github

----

# Methods

### `server.py`
This is the main server application

### `get.py`
Will be used to get data off the server.

### `post.py`
Post new Data to the specific Table

### `update.py`
Update the data of a particular employee

### `delete.py`
Delete the Data of an employee

# ToDo
- authentication
- something more than what it is now