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
Output from the terminal running `functions-framework`:
143
132
```
133
+
Received event with ID: A234-1234-1234 and data hello world
134
+
```
144
135
145
136
More info on sending [CloudEvents](http://cloudevents.io) payloads, see [`examples/cloud_run_cloud_events`](examples/cloud_run_cloud_events/) instruction.
146
137
@@ -333,7 +324,7 @@ You can configure the Functions Framework using command-line flags or environmen
333
324
|`--debug`|`DEBUG`| A flag that allows to run functions-framework to run in debug mode, including live reloading. Default: `False`|
334
325
|`--dry-run`|`DRY_RUN`| A flag that allows for testing the function build from the configuration without creating a server. Default: `False`|
335
326
336
-
## Enable Google Cloud Functions Events
327
+
## Enable Google Cloud Function Events
337
328
338
329
The Functions Framework can unmarshall incoming
339
330
Google Cloud Functions [event](https://cloud.google.com/functions/docs/concepts/events-triggers#events) payloads to `event` and `context` objects.
@@ -356,19 +347,6 @@ documentation on
356
347
357
348
See the [running example](examples/cloud_run_event).
358
349
359
-
## Enable CloudEvents
360
-
361
-
The Functions framework can also unmarshall incoming [CloudEvents](http://cloudevents.io) payloads to the `cloud_event` object. This will be passed as a [CloudEvent](https://github.com/cloudevents/sdk-python) to your function when it receives a request. Note that your function must use the `CloudEvents`-style function signature:
362
-
363
-
```python
364
-
defhello(cloud_event):
365
-
print(f"Received event with ID: {cloud_event['id']}")
366
-
```
367
-
368
-
To enable automatic unmarshalling, set the function signature type to `cloudevent` using the `--signature-type` command-line flag or the `FUNCTION_SIGNATURE_TYPE` environment variable. By default, the HTTP signature type will be used and automatic event unmarshalling will be disabled.
369
-
370
-
For more details on this signature type, check out the Google Cloud Functions documentation on [background functions](https://cloud.google.com/functions/docs/writing/background#cloud_pubsub_example).
371
-
372
350
## Advanced Examples
373
351
374
352
More advanced guides can be found in the [`examples/`](examples/) directory.
0 commit comments