© Kunal Relan 2019
K. RelanBuilding REST APIs with Flaskhttps://doi.org/10.1007/978-1-4842-5022-8_2

2. Database Modeling in Flask

Kunal Relan1 
(1)
New Delhi, Delhi, India
 

This chapter covers one of the most important aspects of REST application development, that is, connecting and interacting with database systems. In this chapter, we’ll discuss about NoSQL and SQL databases, connecting and interacting with them.

In this chapter we’ll cover the following topics:
  1. 1.

    NoSQL vs. SQL databases

     
  2. 2.

    Connecting with Flask-SQLAlchemy

     
  3. 3.

    Interacting with MySQL DB using Flask-SQLAlchemy

     
  4. 4.

    Connecting with Flask-MongoEngine

     
  5. 5.

    Interacting with MongoDB using Flask-MongoEngine

     

Introduction

Flask being a microframework provides flexibility of the data source for applications ...

Get Building REST APIs with Flask: Create Python Web Services with MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.