Kalidas R
Kalidas R

Reputation: 3

How can I connect Firebase DB to Django project in Python

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

Answers (1)

saro
saro

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

Related Questions