You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Functions Framework is based on the [Python Runtime on Google Cloud Functions](https://cloud.google.com/functions/docs/concepts/python-runtime).
300
299
301
300
On Cloud Functions, using the Functions Framework is not necessary: you don't need to add it to your `requirements.txt` file.
302
301
303
302
After you've written your function, you can simply deploy it from your local machine using the `gcloud` command-line tool. [Check out the Cloud Functions quickstart](https://cloud.google.com/functions/docs/quickstart).
304
303
305
-
### Cloud Run/Cloud Run on GKE
306
-
307
-
Once you've written your function and added the Functions Framework to your `requirements.txt` file, all that's left is to create a container image. [Check out the Cloud Run quickstart](https://cloud.google.com/run/docs/quickstarts/build-and-deploy) for Python to create a container image and deploy it to Cloud Run. You'll write a `Dockerfile` when you build your container. This `Dockerfile` allows you to specify exactly what goes into your container (including custom binaries, a specific operating system, and more). [Here is an example `Dockerfile` that calls Functions Framework.](https://github.com/GoogleCloudPlatform/functions-framework-python/blob/main/examples/cloud_run_http)
308
-
309
-
If you want even more control over the environment, you can [deploy your container image to Cloud Run on GKE](https://cloud.google.com/run/docs/quickstarts/prebuilt-deploy-gke). With Cloud Run on GKE, you can run your function on a GKE cluster, which gives you additional control over the environment (including use of GPU-based instances, longer timeouts and more).
310
-
311
304
### Container environments based on Knative
312
305
313
306
Cloud Run and Cloud Run on GKE both implement the [Knative Serving API](https://www.knative.dev/docs/). The Functions Framework is designed to be compatible with Knative environments. Just build and deploy your container to a Knative environment.
@@ -325,10 +318,10 @@ You can configure the Functions Framework using command-line flags or environmen
325
318
|`--source`|`FUNCTION_SOURCE`| The path to the file containing your function. Default: `main.py` (in the current working directory) |
326
319
|`--debug`|`DEBUG`| A flag that allows to run functions-framework to run in debug mode, including live reloading. Default: `False`|
327
320
328
-
## Enable Google Cloud Function Events
321
+
## Enable Google Cloud Run function Events
329
322
330
323
The Functions Framework can unmarshall incoming
331
-
Google Cloud Functions[event](https://cloud.google.com/functions/docs/concepts/events-triggers#events) payloads to `event` and `context` objects.
324
+
Google Cloud Run functions[event](https://cloud.google.com/functions/docs/concepts/events-triggers#events) payloads to `event` and `context` objects.
332
325
These will be passed as arguments to your function when it receives a request.
333
326
Note that your function must use the `event`-style function signature:
0 commit comments