Multiple Database in Flask

How can we use multiple database in flask.

Flask-SQLAlchemy can easily connect to multiple databases with binds

Example Configuration

Define multiple database uri

Binds table to each other database: We need define name of table for each database

binds “Table1” to database “db2_name”

Flask init multiple database: flask db init — multidb

--

--

Dev-Ops, Data Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store