Skip to content

[Bug]: <title>Forced to add "databaseURL" in config #34

@QuestMerchant

Description

@QuestMerchant

Is there an existing issue for this?

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions