skillfed

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.

functions-framework v3.10.2 8.0M downloads/30d#1,678 on PyPI968
Permissive license Apache-2.0 Active released

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-framework

uv

uv add functions-framework

poetry

poetry add functions-framework

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

serverless function framework pythonfaas framework google cloudpython http function decoratorcloud functions local developmentcloudevents handler pythonportable serverless functions
serverlesscloud-functionsfaas

More Application Frameworks packages