{"id":24383,"library":"pyrebase4","title":"Pyrebase4","description":"A Python wrapper for the Firebase API with updated dependencies, version 4.9.0. Active development with frequent releases.","status":"active","version":"4.9.0","language":"python","source_language":"en","source_url":"https://github.com/nhorvath/Pyrebase4","tags":["firebase","wrapper","auth","realtime-database","cloud-storage"],"install":[{"cmd":"pip install pyrebase4","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used for HTTP requests; requires >=2.31.0","package":"requests","optional":false},{"reason":"Used for Firebase Auth (deprecated, but still required by current version)","package":"oauth2client","optional":false}],"imports":[{"note":"The module name is pyrebase; using 'firebase' is a common mistake from older libraries.","wrong":"from pyrebase import ... or import firebase","symbol":"pyrebase","correct":"import pyrebase"}],"quickstart":{"code":"import pyrebase\n\nconfig = {\n    \"apiKey\": os.environ.get('FIREBASE_API_KEY', ''),\n    \"authDomain\": os.environ.get('FIREBASE_AUTH_DOMAIN', ''),\n    \"databaseURL\": os.environ.get('FIREBASE_DATABASE_URL', ''),\n    \"storageBucket\": os.environ.get('FIREBASE_STORAGE_BUCKET', '')\n}\nfirebase = pyrebase.initialize_app(config)\nauth = firebase.auth()\nuser = auth.sign_in_with_email_and_password(\"test@example.com\", \"password\")\nprint(user)","lang":"python","description":"Initialize Pyrebase with Firebase config and authenticate a user."},"warnings":[{"fix":"Run pip install --upgrade requests>=2.31.0","message":"Versions >=4.8.0 require requests >=2.31.0, which has API changes. Older requests versions will break.","severity":"breaking","affected_versions":">=4.8.0"},{"fix":"Update code to handle the new object: etag_result = db.child('path').get_etag(); etag_value = etag_result['ETag']","message":"v4.6.0 changed get_etag() return format: now returns an object with 'ETag' and 'value' keys, not just the ETag string. conditional_set and conditional_remove expect the new format.","severity":"breaking","affected_versions":"4.6.0 - 4.9.0"},{"fix":"Either migrate away from App Engine or use pyrebase4==4.8.0","message":"v4.9.0 dropped support for App Engine (Google App Engine runtime). If you deploy on App Engine, you must pin to v4.8.0 or earlier.","severity":"breaking","affected_versions":">=4.9.0"},{"fix":"Disable email enumeration protection in Firebase console, or handle exceptions with appropriate user feedback.","message":"Firebase Auth with email/password may fail if 'Email Enumeration Protection' is enabled in Firebase project settings. The library does not handle this gracefully.","severity":"gotcha","affected_versions":"all"},{"fix":"Monitor for updates; consider pinning to a version that still works if migration breaks your code.","message":"The library uses oauth2client, which is deprecated and may have security issues. Future versions may migrate to google-auth.","severity":"deprecated","affected_versions":"current (4.9.0)"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install oauth2client","cause":"Missing oauth2client dependency (installed automatically with pyrebase4, but may be missing in some environments).","error":"ModuleNotFoundError: No module named 'oauth2client'"},{"fix":"pip install --upgrade requests>=2.31.0","cause":"Incompatible version of requests (<2.31.0) with pyrebase4 >=4.8.0.","error":"TypeError: __init__() got an unexpected keyword argument 'max_retries'"},{"fix":"Upgrade pyrebase4 to latest (v4.9.0) and ensure requests >=2.31.0.","cause":"Occurs when using outdated Pyrebase code with newer requests that changed response structure (common after v4.8.0).","error":"AttributeError: 'NoneType' object has no attribute 'key'"},{"fix":"Use Firebase Auth REST API via pyrebase4 auth methods instead of Admin SDK. If you need Admin SDK, use firebase-admin instead.","cause":"Trying to use Firebase Admin SDK features without proper credentials (Pyrebase4 uses Firebase Auth, not Admin SDK).","error":"google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}