Skip to content

A demo of a python CRUD API using Flask, SQLAlchemy & Marshmallow

Notifications You must be signed in to change notification settings

itsamayo/flask_crud_api_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python RESTful API using Flask & SQLAlchemy & Marshmallow + Unit Tests

Create, read, update and delete objects from a SQLite DB via a RESTful API written in Python, using Flask, SQLite, SQLAlchemy & Marshmallow, including unit tests

Quick Start

# Install dependencies
$ pip install -r requirements.txt

# Create DB
$ python
>> from app import db
>> db.create_all()
>> exit()

# Run Server (http://localhost:8080)
flask run

Endpoints

  • GET /product
  • GET /product/:id
  • POST /product
  • PUT /product/:id
  • DELETE /product
  • DELETE /product/:id

Unit Tests

# To run only the tests
python -m unittest discover __unittests__

# To get a coverage report
coverage run -m unittest discover __unittests__/
coverage report -m

About

A demo of a python CRUD API using Flask, SQLAlchemy & Marshmallow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published