Skip to content

Commit 6f0d848

Browse files
authored
Version 1.5.0 (#69)
* Revert "Version 2.0.0 (#67)" This reverts commit f2471b4. * Revert "Add Cloud Events support for #55 (#56) (#64)" This reverts commit 8f3fe35. * Version 1.5.0
1 parent f2471b4 commit 6f0d848

File tree

17 files changed

+224
-609
lines changed

17 files changed

+224
-609
lines changed

CHANGELOG.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9-
## [2.0.0] - 2020-07-01
10-
### Added
11-
- Support `cloudevent` signature type ([#55], [#56])
12-
9+
## [1.5.0] - 2020-07-06
1310
### Changed
1411
- Framework will consume entire request before responding ([#66])
1512

@@ -70,8 +67,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7067
### Added
7168
- Initial release
7269

73-
[Unreleased]: https://github.com/GoogleCloudPlatform/functions-framework-python/compare/v2.0.0...HEAD
74-
[2.0.0]: https://github.com/GoogleCloudPlatform/functions-framework-python/releases/tag/v2.0.0
70+
[Unreleased]: https://github.com/GoogleCloudPlatform/functions-framework-python/compare/v1.5.0...HEAD
71+
[1.5.0]: https://github.com/GoogleCloudPlatform/functions-framework-python/releases/tag/v1.5.0
7572
[1.4.4]: https://github.com/GoogleCloudPlatform/functions-framework-python/releases/tag/v1.4.4
7673
[1.4.3]: https://github.com/GoogleCloudPlatform/functions-framework-python/releases/tag/v1.4.3
7774
[1.4.2]: https://github.com/GoogleCloudPlatform/functions-framework-python/releases/tag/v1.4.2
@@ -86,8 +83,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8683

8784
[#66]: https://github.com/GoogleCloudPlatform/functions-framework-python/pull/66
8885
[#61]: https://github.com/GoogleCloudPlatform/functions-framework-python/pull/61
89-
[#56]: https://github.com/GoogleCloudPlatform/functions-framework-python/pull/56
90-
[#55]: https://github.com/GoogleCloudPlatform/functions-framework-python/pull/55
9186
[#49]: https://github.com/GoogleCloudPlatform/functions-framework-python/pull/49
9287
[#44]: https://github.com/GoogleCloudPlatform/functions-framework-python/pull/44
9388
[#38]: https://github.com/GoogleCloudPlatform/functions-framework-python/pull/38

README.md

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pip install functions-framework
4545
Or, for deployment, add the Functions Framework to your `requirements.txt` file:
4646

4747
```
48-
functions-framework==2.0.0
48+
functions-framework==1.5.0
4949
```
5050

5151
# Quickstart: Hello, World on your local machine
@@ -129,57 +129,27 @@ You can configure the Functions Framework using command-line flags or environmen
129129
| `--host` | `HOST` | The host on which the Functions Framework listens for requests. Default: `0.0.0.0` |
130130
| `--port` | `PORT` | The port on which the Functions Framework listens for requests. Default: `8080` |
131131
| `--target` | `FUNCTION_TARGET` | The name of the exported function to be invoked in response to requests. Default: `function` |
132-
| `--signature-type` | `FUNCTION_SIGNATURE_TYPE` | The signature used when writing your function. Controls unmarshalling rules and determines which arguments are used to invoke your function. Default: `http`; accepted values: `http` or `event` or `cloudevent` |
132+
| `--signature-type` | `FUNCTION_SIGNATURE_TYPE` | The signature used when writing your function. Controls unmarshalling rules and determines which arguments are used to invoke your function. Default: `http`; accepted values: `http` or `event` |
133133
| `--source` | `FUNCTION_SOURCE` | The path to the file containing your function. Default: `main.py` (in the current working directory) |
134134
| `--debug` | `DEBUG` | A flag that allows to run functions-framework to run in debug mode, including live reloading. Default: `False` |
135135

136+
# Enable CloudEvents
136137

137-
# Enable Google Cloud Functions Events
138-
139-
The Functions Framework can unmarshall incoming
140-
Google Cloud Functions [event](https://cloud.google.com/functions/docs/concepts/events-triggers#events) payloads to `data` and `context` objects.
141-
These will be passed as arguments to your function when it receives a request.
142-
Note that your function must use the `event`-style function signature:
143-
138+
The Functions Framework can unmarshall incoming [CloudEvents](http://cloudevents.io) payloads to `data` and `context` objects. These will be passed as arguments to your function when it receives a request. Note that your function must use the event-style function signature:
144139

145140
```python
146141
def hello(data, context):
147142
print(data)
148143
print(context)
149144
```
150145

151-
To enable automatic unmarshalling, set the function signature type to `event`
152-
using a command-line flag or an environment variable. By default, the HTTP
153-
signature will be used and automatic event unmarshalling will be disabled.
154-
155-
For more details on this signature type, check out the Google Cloud Functions
156-
documentation on
157-
[background functions](https://cloud.google.com/functions/docs/writing/background#cloud_pubsub_example).
158-
159-
See the [running example](examples/cloud_run_event).
160-
161-
# Enable CloudEvents
162-
163-
The Functions Framework can unmarshall incoming
164-
[CloudEvent](http://cloudevents.io) payloads to a `cloudevent` object.
165-
It will be passed as an argument to your function when it receives a request.
166-
Note that your function must use the `cloudevent`-style function signature
167-
168-
169-
```python
170-
def hello(cloudevent):
171-
print("Received event with ID: %s" % cloudevent.EventID())
172-
return 200
173-
```
174-
175-
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.
146+
To enable automatic unmarshalling, set the function signature type to `event` 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.
176147

177-
See the [running example](examples/cloud_run_cloudevents).
148+
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).
178149

179150
# Advanced Examples
180151

181-
More advanced guides can be found in the [`examples/`](./examples/) directory. You can also find examples
182-
on using the CloudEvent Python SDK [here](https://github.com/cloudevents/sdk-python).
152+
More advanced guides can be found in the [`examples/`](./examples/) directory.
183153

184154
# Contributing
185155

examples/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Python Functions Frameworks Examples
22

33
* [`cloud_run_http`](./cloud_run_http/) - Deploying an HTTP function to [Cloud Run](http://cloud.google.com/run) with the Functions Framework
4-
* [`cloud_run_event`](./cloud_run_event/) - Deploying a [Google Cloud Functions Event](https://cloud.google.com/functions/docs/concepts/events-triggers#events) function to [Cloud Run](http://cloud.google.com/run) with the Functions Framework
5-
* [`cloud_run_cloudevents`](./cloud_run_cloudevents/) - Deploying a [CloudEvent](https://github.com/cloudevents/sdk-python) function to [Cloud Run](http://cloud.google.com/run) with the Functions Framework
4+
* [`cloud_run_event`](./cloud_run_event/) - Deploying a CloudEvent function to [Cloud Run](http://cloud.google.com/run) with the Functions Framework

examples/cloud_run_cloudevents/Dockerfile

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/cloud_run_cloudevents/README.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

examples/cloud_run_cloudevents/main.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/cloud_run_cloudevents/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/cloud_run_event/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ RUN pip install gunicorn functions-framework
1212
RUN pip install -r requirements.txt
1313

1414
# Run the web service on container startup.
15-
CMD exec functions-framework --target=hello --signature_type=event
15+
CMD exec functions-framework --target=hello --signature-type=event

examples/cloud_run_event/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
setup(
2727
name="functions-framework",
28-
version="2.0.0",
28+
version="1.5.0",
2929
description="An open source FaaS (Function as a service) framework for writing portable Python functions -- brought to you by the Google Cloud Functions team.",
3030
long_description=long_description,
3131
long_description_content_type="text/markdown",
@@ -52,7 +52,6 @@
5252
"click>=7.0,<8.0",
5353
"watchdog>=0.10.0",
5454
"gunicorn>=19.2.0,<21.0; platform_system!='Windows'",
55-
"cloudevents<1.0",
5655
],
5756
entry_points={
5857
"console_scripts": [

0 commit comments

Comments
 (0)