0

I have to improve python project that uses Firebase Database (that needed changes in a database). The developer of that project is disappeared and I have no access to Google Account, but the database still responses and I can have access to that throw program.

Things that stored in code:

"fire": {
    "type": "service_account",
    "project_id": "...",
    "private_key_id": "...",
    "private_key": "-----BEGIN PRIVATE KEY-----\n ...",
    "client_email": "...@appspot.gserviceaccount.com",
    "client_id": "...",
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
    "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/...gserviceaccount.com"
}

Code of connection:

import firebase_admin

cert = self.data.get('fire')   #parsing JSON into dict
cred = credentials.Certificate(cert)
firebase_admin.initialize_app(cred)
self.db = firestore.client()


I need to export database into JSON so I can create the new one identical and make the required changes.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807

0 Answers0