firebase-functions
Firebase Functions Python SDK
What it is and what it does
Firebase Functions is Google's official Python SDK for writing Cloud Functions that respond to Firebase events. It lets you define functions that trigger on database writes, authentication events, HTTP requests, and other Firebase platform signals, then deploy them to a managed serverless environment. The SDK abstracts away infrastructure management—you write decorated Python functions and the platform handles scaling, networking, and execution.
The package integrates deeply with Firebase services through dependencies on firebase-admin, google-cloud-firestore, and google-events, plus web framework support via flask and functions-framework. It's designed for developers building backends that react to Firebase data changes or user actions without managing servers. The SDK is actively maintained and supports modern Python versions, though it remains in Beta status.
Use it for:
- Trigger backend logic when data is written to Realtime Database or Firestore (e.g., send notifications on new posts).
- Respond to Firebase Authentication events (e.g., log new user signups or clean up data on account deletion).
- Build HTTP-triggered microservices that integrate with Firebase and other Google Cloud services.
- Schedule periodic tasks (e.g., daily cleanup, report generation) using Cloud Scheduler integration.
- Process events from external systems via Cloud Pub/Sub and route them to Firebase services.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Firebase Functions Python SDK lets you write and deploy server code that responds to Firebase events and integrates with Firebase services in a hosted, scalable environment.
Yes, if you are building a Firebase backend in Python. The SDK is actively maintained, has low install friction, carries no known vulnerabilities, and integrates directly with Firebase services. The Beta status and 10 runtime dependencies are minor considerations; the permissive Apache-2.0 license poses no barrier. Install it when you need event-driven server code on Firebase.
Install
firebase-functions on PyPI
pip
pip install firebase-functionsuv
uv add firebase-functionspoetry
poetry add firebase-functionsInstalling firebase-functions
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release 71 days ago and ongoing commits. Supports current Python versions (3.10–3.13).
License in practice
Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions.
Quickstart
pip install firebase-functions
from firebase_functions import db_fn
@db_fn.on_value_created(reference="/posts/{post_id}")
def new_post(event):
print(f"Received new post with ID: {event.params.get('post_id')}")
Requires Python 3.10 or later; Firebase project credentials and deployment infrastructure (Cloud Functions for Firebase) are needed to run functions in production.
Verify before relying
- Whether all 10 runtime dependencies (flask, functions-framework, firebase-admin, etc.) are required for basic usage or only for specific function types.
- Performance characteristics and cold-start latency typical for Python Cloud Functions.
- Maturity and stability guarantees given Beta status (Development Status :: 4).
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — flask, functions-framework, firebase-admin, pyyaml, typing-extensions, cloudevents, flask-cors, pyjwt, google-events, google-cloud-firestore |
| Maintenance | actively maintained — 71 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 449,809/month — #6,594 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: firebase_functions-0.6.0-py3-none-any.whl
Keywords: firebase, functions, google, cloud
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
firebase-adminFirebase Admin Python SDK provides server-side…
permissive · top 1,000 on PyPI
pyfcmPyFCM is a Python client for Firebase Cloud…
permissive · top 15,000 on PyPI
fcm-djangoDjango app that integrates Firebase Cloud…
permissive · top 15,000 on PyPI
firebase-messagingReceives push notifications sent via Firebase…
permissive · top 15,000 on PyPI
fastapi-cloudauthIntegrates FastAPI applications with cloud…
permissive · top 15,000 on PyPI
azure-functionsProvides Python bindings and decorators for…
permissive · top 5,000 on PyPI
workers-runtime-sdkPython SDK for building and running…
permissive · top 15,000 on PyPI
modalModal is a Python client library that lets you…
permissive · top 1,000 on PyPI
apache-airflow-providers-googleIntegrates Apache Airflow with Google Cloud…
permissive · top 1,000 on PyPI
google-eventsProvides Python classes for Google CloudEvents…
permissive · top 15,000 on PyPI