Reputation: 3
Do you know whether it is possible to connect to the Firebase database through the Django framework in Python instead of SQL, SQLLite3, or PostgreSQL, etc.,
In the event that it is possible to connect Firebase DB to Django, can anyone please assist me in connecting Firebase DB to Django?
Upvotes: 0
Views: 256
Reputation: 821
Do your imports
import firebase_admin
from firebase_admin import credentials, messaging
from firebase_admin import firestore
#initialize firebase en firestore database
json_file = //the json from firebase"
cred = credentials.Certificate(json_file)
firebase_admin.initialize_app(cred)
#initialize de database firestore
db = firestore.client()
After this its up and running
Upvotes: 1