https://github.com/wmramadan/flask-api-boilerplate
A Simple Flask REST API pre-configured with Flask-SQLAlchemy, Serializer, and Logging. This will get you up and running quickly.
https://github.com/wmramadan/flask-api-boilerplate
api boilerplate flask flask-api flask-rest-api flask-restful flask-sqlalchemy python
Last synced: 15 days ago
JSON representation
A Simple Flask REST API pre-configured with Flask-SQLAlchemy, Serializer, and Logging. This will get you up and running quickly.
- Host: GitHub
- URL: https://github.com/wmramadan/flask-api-boilerplate
- Owner: WMRamadan
- License: gpl-3.0
- Created: 2022-12-06T19:08:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-19T22:42:57.000Z (over 2 years ago)
- Last Synced: 2025-04-19T23:31:54.913Z (about 1 month ago)
- Topics: api, boilerplate, flask, flask-api, flask-rest-api, flask-restful, flask-sqlalchemy, python
- Language: Python
- Homepage:
- Size: 22.5 KB
- Stars: 8
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Flask API Boilerplate
Flask REST API pre-configured with Flask-SQLAlchemy, Flask-Serializer & Logging. This will get you up and running with CRUD operations quickly. Use this starter, boilerplate for all your new Flask projects.## Requirements
- Python 3
- python3-virtualenv
- python3-pip## Quick Start
1. Clone the repo
```bash
git clone https://github.com/WMRamadan/flask-api-biolerplate
cd flask-api-boilerplate
```2. Initialize and activate a virtual environment:
```bash
virtualenv env
source env/bin/activate
```3. Install dependencies:
```bash
pip3 install -r requirements.txt
```4. Run the development server:
```bash
python3 app.py
```5. View the api at http://localhost:5000
## Performing CRUD Operations
Create Note:
```bash
curl -X POST http://localhost:5000/notes -H 'Content-Type: application/json' -d '{"note": "This is a note"}'
```Get all Notes:
```bash
curl -X GET http://localhost:5000/notes
```Get Note by ID:
```bash
curl -X GET http://localhost:5000/note/
```Delete Note by ID:
```bash
curl -X DELETE http://localhost:5000/note/
```Update Note by ID:
```bash
curl -X PUT http://localhost:5000/note/ -d '{"note": "This is an updated note"}'
```