Registry / gcp / pyrebase4

pyrebase4

JSON →
library4.9.0pypypi✓ verified 86d ago

A Python wrapper for the Firebase API with updated dependencies, version 4.9.0. Active development with frequent releases.

pip install pyrebase4
INSTALL
IMPORT
SIG · PYREBASE4
P
pyrebase4
gcppythonv4.9.0
Install
5.8s avg
Import
2168ms
Disk
65MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.9.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 2.310s · 63.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.8s · import 2.026s · 65MB
65MB installed
● package 65MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pyrebase
import pyrebase
from pyrebase import ... or import firebase
The module name is pyrebase; using 'firebase' is a common mistake from older libraries.

Initialize Pyrebase with Firebase config and authenticate a user.

import pyrebase config = { "apiKey": os.environ.get('FIREBASE_API_KEY', ''), "authDomain": os.environ.get('FIREBASE_AUTH_DOMAIN', ''), "databaseURL": os.environ.get('FIREBASE_DATABASE_URL', ''), "storageBucket": os.environ.get('FIREBASE_STORAGE_BUCKET', '') } firebase = pyrebase.initialize_app(config) auth = firebase.auth() user = auth.sign_in_with_email_and_password("test@example.com", "password") print(user)
Debug
Known issues
breakingVersions >=4.8.0 require requests >=2.31.0, which has API changes. Older requests versions will break.
fix
Run pip install --upgrade requests>=2.31.0
affects: >=4.8.0
breakingv4.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.
fix
Update code to handle the new object: etag_result = db.child('path').get_etag(); etag_value = etag_result['ETag']
affects: 4.6.0 - 4.9.0
breakingv4.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.
fix
Either migrate away from App Engine or use pyrebase4==4.8.0
affects: >=4.9.0
gotchaFirebase Auth with email/password may fail if 'Email Enumeration Protection' is enabled in Firebase project settings. The library does not handle this gracefully.
fix
Disable email enumeration protection in Firebase console, or handle exceptions with appropriate user feedback.
affects: all
deprecatedThe library uses oauth2client, which is deprecated and may have security issues. Future versions may migrate to google-auth.
fix
Monitor for updates; consider pinning to a version that still works if migration breaks your code.
affects: current (4.9.0)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'oauth2client'
Missing oauth2client dependency (installed automatically with pyrebase4, but may be missing in some environments).
fix
pip install oauth2client
TypeError: __init__() got an unexpected keyword argument 'max_retries'
Incompatible version of requests (<2.31.0) with pyrebase4 >=4.8.0.
fix
pip install --upgrade requests>=2.31.0
AttributeError: 'NoneType' object has no attribute 'key'
Occurs when using outdated Pyrebase code with newer requests that changed response structure (common after v4.8.0).
fix
Upgrade pyrebase4 to latest (v4.9.0) and ensure requests >=2.31.0.
google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials.
Trying to use Firebase Admin SDK features without proper credentials (Pyrebase4 uses Firebase Auth, not Admin SDK).
fix
Use Firebase Auth REST API via pyrebase4 auth methods instead of Admin SDK. If you need Admin SDK, use firebase-admin instead.
Upgrade
Version history
4.9.0latest on PyPI · released Jan 19, 2026
Audit
Dependencies
requestsrequiredUsed for HTTP requests; requires >=2.31.0
oauth2clientrequiredUsed for Firebase Auth (deprecated, but still required by current version)
Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
pyrebase4 — pip install pyrebase4 · libregistry