Firebase With Flask

Kadir Taban
Jan 19, 2022

How to Integrated Firebase on Flask ?

First of all, Firebase is differently from SQLite(default db) which is NoSQL database as it like MongoDB.

Create a new database on https://console.firebase.google.com/.

After create your Flask Project, you need to install firebase extensions those are:

-pip install firebase-admin

-pip install pyrebase

you have to obtain config.json from firestore settings .

Press generate private key and which will download. Now, this is your config.json rename and move to project file.

and you can write config.py same as above the picture.

and use in your models “from src.config import db” and so you can simply create your api’s with using firebase database.

--

--