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
- Host: GitHub
- URL: https://github.com/alx-xlx/rest-api
- Owner: alx-xlx
- License: mit
- Created: 2021-04-05T05:45:43.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-02-09T10:50:14.000Z (over 4 years ago)
- Last Synced: 2025-09-09T21:24:14.936Z (10 months ago)
- Topics: flask-api, python, rest-api, restful-api, simple-app
- Language: Python
- Homepage:
- Size: 966 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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)

## Example
http://127.0.0.1:5000/employees/1
----
# 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