functions-framework
An open source FaaS (Function as a service) framework for writing portable Python functions -- brought to you by the Google Cloud Functions team.
What it is and what it does
Functions Framework is an open-source FaaS runtime maintained by Google Cloud Functions team that abstracts away HTTP server setup and request handling, letting you focus on writing business logic as decorated Python functions. You define a function with a simple decorator (@functions_framework.http or @functions_framework.cloud_event), and the framework handles spinning up a local development server, routing requests, and unmarshalling CloudEvents payloads.
The framework supports HTTP functions (request/response), CloudEvent functions (event-driven), and Pub/Sub event handlers. It runs on your local machine for testing, deploys to Google Cloud Run Functions, or runs in Knative-based environments. Runtime dependencies include Flask for HTTP handling, click for CLI, watchdog for file monitoring, gunicorn and uvicorn for production serving, and cloudevents for spec-compliant event unmarshalling.
Use it for:
- Write a simple HTTP endpoint function locally and deploy it unchanged to Google Cloud Run Functions.
- Handle CloudEvents from event sources (Pub/Sub, Cloud Storage) with automatic payload unmarshalling.
- Develop and test serverless functions in a local development server before cloud deployment.
- Build event-driven functions that respond to Pub/Sub messages via the framework's event signature type.
- Prototype lightweight microservices without managing Flask app initialization or WSGI server configuration.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A lightweight FaaS framework that lets you write portable Python functions deployable to Google Cloud Run, local development, or Knative environments without writing HTTP server boilerplate.
Yes. Production-stable, actively maintained, zero known vulnerabilities, and permissive licensing. Install friction is low. Use it if you're building serverless functions for Google Cloud Run, local testing of cloud functions, or any portable FaaS workload. The framework eliminates boilerplate and handles CloudEvents unmarshalling automatically—solid choice for rapid function development.
Install
functions-framework on PyPI
pip
pip install functions-frameworkuv
uv add functions-frameworkpoetry
poetry add functions-frameworkInstalling functions-framework
Before you install
Low friction install with a pure-Python wheel. Active maintenance (last commit 2026-08-05, 968 repository stars) and production-stable status. Supports Python 3.7 through 3.12.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for both proprietary and open-source projects.
Quickstart
pip install functions-framework
import functions_framework
import flask
@functions_framework.http
def hello(request: flask.Request) -> flask.typing.ResponseReturnValue:
return "Hello world!"
# Run: functions-framework --target hello --debug
Verify before relying
- Whether the framework's performance characteristics suit your expected request volume or latency requirements.
- Compatibility with specific Google Cloud Run or Knative deployment configurations beyond the documented quickstarts.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4,>=3.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — flask, click, watchdog, gunicorn, cloudevents, Werkzeug, starlette, uvicorn, uvicorn-worker |
| Maintenance | actively maintained — 58 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,965,513/month — #1,678 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: functions_framework-3.10.2-py3-none-any.whl
Keywords: functions-framework
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
cloudeventsProvides Python primitives to create,…
permissive · top 5,000 on PyPI
libProvides zero-dependency Python bindings to…
permissive · top 15,000 on PyPI
serverless-wsgiBridges Python WSGI applications (Flask,…
permissive · top 15,000 on PyPI
google-eventsProvides Python classes for Google CloudEvents…
permissive · top 15,000 on PyPI
zappaZappa packages and deploys Python WSGI and ASGI…
permissive · top 15,000 on PyPI
fastapi-cloudeventsFastAPI plugin that automatically parses and…
permissive · top 15,000 on PyPI
falfal is a serverless Python runtime that…
unclear · top 15,000 on PyPI
google-cloud-functionsPython client library for Google Cloud…
permissive · top 5,000 on PyPI
gcloudProvides Python client libraries for Google…
permissive · top 15,000 on PyPI
google-cloud-deployPython client library for Google Cloud Deploy,…
permissive · top 15,000 on PyPI