firebase-rest-api
firebase-rest-api copied to clipboard
[Bug]: <title>Forced to add "databaseURL" in config
Is there an existing issue for this?
- [X] I have searched the existing issues
Environment
- OS: Windows 11
- Python: 3.11
What happened?
firebase fails to initialize if not using Realtime Database. I feel like this should be optional now that Firestore is an option. Firestore doesn't store a URL in the config and this results in KeyError: 'databaseURL'
Code Snippet
config = {
"apiKey": "******",
"authDomain": "******",
"projectId": "******",
"storageBucket": "******",
"messagingSenderId": "******",
"appId": "******",
"measurementId": "******"
}
# Initialize Firebase
firebaseApp = firebase.initialize_app(config)
Relevant log output
Traceback (most recent call last):
File "app.py", in <module>
firebaseApp = firebase.initialize_app(config)
File ".venv\Lib\site-packages\firebase\__init__.py" in initialize_app
return Firebase(config)
File ".venv\Lib\site-packages\firebase\__init__.py" in __init__
self.database_url = config["databaseURL"]
KeyError: 'databaseURL'
Anything else?
No response
Hello @QuestMerchant , thank you for submitting an issue! A project committer will shortly review the issue.