functions-framework 3.8.1__tar.gz → 3.8.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {functions_framework-3.8.1 → functions_framework-3.8.3}/PKG-INFO +14 -20
- {functions_framework-3.8.1 → functions_framework-3.8.3}/README.md +4 -11
- functions_framework-3.8.3/pyproject.toml +57 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_function_registry.py +0 -1
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework.egg-info/PKG-INFO +14 -20
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework.egg-info/SOURCES.txt +1 -2
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework.egg-info/requires.txt +1 -1
- functions_framework-3.8.1/setup.py +0 -69
- functions_framework-3.8.1/src/functions_framework.egg-info/namespace_packages.txt +0 -2
- {functions_framework-3.8.1 → functions_framework-3.8.3}/LICENSE +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/setup.cfg +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/__init__.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/__main__.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_cli.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_http/__init__.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_http/flask.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_http/gunicorn.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_typed_event.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/background_event.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/event_conversion.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/exceptions.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/execution_id.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/py.typed +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/request_timeout.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework.egg-info/dependency_links.txt +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework.egg-info/entry_points.txt +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework.egg-info/top_level.txt +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/__init__.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/__init__.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions/__init__.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions/context.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions_v1/__init__.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions_v1/context.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions_v1beta2/__init__.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions_v1beta2/context.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_cli.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_cloud_event_functions.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_convert.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_decorator_functions.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_execution_id.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_function_registry.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_functions.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_http.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_main.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_samples.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_timeouts.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_typed_event_functions.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_typing.py +0 -0
- {functions_framework-3.8.1 → functions_framework-3.8.3}/tests/test_view_functions.py +0 -0
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: functions-framework
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.3
|
|
4
4
|
Summary: An open source FaaS (Function as a service) framework for writing portable Python functions -- brought to you by the Google Cloud Functions team.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Author-email: Google LLC <googleapis-packages@google.com>
|
|
6
|
+
Maintainer-email: Google LLC <googleapis-packages@google.com>
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://github.com/googlecloudplatform/functions-framework-python
|
|
8
9
|
Keywords: functions-framework
|
|
9
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
11
|
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.7
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.8
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Requires-Python:
|
|
18
|
+
Requires-Python: <4,>=3.5
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist: flask<4.0,>=
|
|
21
|
+
Requires-Dist: flask<4.0,>=2.0
|
|
22
22
|
Requires-Dist: click<9.0,>=7.0
|
|
23
23
|
Requires-Dist: watchdog>=1.0.0
|
|
24
24
|
Requires-Dist: gunicorn>=22.0.0; platform_system != "Windows"
|
|
25
25
|
Requires-Dist: cloudevents<2.0.0,>=1.2.0
|
|
26
26
|
Requires-Dist: Werkzeug<4.0.0,>=0.14
|
|
27
|
+
Dynamic: license-file
|
|
27
28
|
|
|
28
29
|
# Functions Framework for Python
|
|
29
30
|
|
|
@@ -37,9 +38,8 @@ Python functions -- brought to you by the Google Cloud Functions team.
|
|
|
37
38
|
The Functions Framework lets you write lightweight functions that run in many
|
|
38
39
|
different environments, including:
|
|
39
40
|
|
|
40
|
-
* [Google Cloud Functions](https://cloud.google.com/functions/)
|
|
41
|
+
* [Google Cloud Run Functions](https://cloud.google.com/functions/)
|
|
41
42
|
* Your local development machine
|
|
42
|
-
* [Cloud Run and Cloud Run for Anthos](https://cloud.google.com/run/)
|
|
43
43
|
* [Knative](https://github.com/knative/)-based environments
|
|
44
44
|
|
|
45
45
|
The framework allows you to go from:
|
|
@@ -321,7 +321,7 @@ https://cloud.google.com/functions/docs/tutorials/pubsub#functions_helloworld_pu
|
|
|
321
321
|
|
|
322
322
|
## Run your function on serverless platforms
|
|
323
323
|
|
|
324
|
-
### Google Cloud
|
|
324
|
+
### Google Cloud Run functions
|
|
325
325
|
|
|
326
326
|
This Functions Framework is based on the [Python Runtime on Google Cloud Functions](https://cloud.google.com/functions/docs/concepts/python-runtime).
|
|
327
327
|
|
|
@@ -329,12 +329,6 @@ On Cloud Functions, using the Functions Framework is not necessary: you don't ne
|
|
|
329
329
|
|
|
330
330
|
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).
|
|
331
331
|
|
|
332
|
-
### Cloud Run/Cloud Run on GKE
|
|
333
|
-
|
|
334
|
-
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)
|
|
335
|
-
|
|
336
|
-
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).
|
|
337
|
-
|
|
338
332
|
### Container environments based on Knative
|
|
339
333
|
|
|
340
334
|
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.
|
|
@@ -352,10 +346,10 @@ You can configure the Functions Framework using command-line flags or environmen
|
|
|
352
346
|
| `--source` | `FUNCTION_SOURCE` | The path to the file containing your function. Default: `main.py` (in the current working directory) |
|
|
353
347
|
| `--debug` | `DEBUG` | A flag that allows to run functions-framework to run in debug mode, including live reloading. Default: `False` |
|
|
354
348
|
|
|
355
|
-
## Enable Google Cloud
|
|
349
|
+
## Enable Google Cloud Run function Events
|
|
356
350
|
|
|
357
351
|
The Functions Framework can unmarshall incoming
|
|
358
|
-
Google Cloud
|
|
352
|
+
Google Cloud Run functions [event](https://cloud.google.com/functions/docs/concepts/events-triggers#events) payloads to `event` and `context` objects.
|
|
359
353
|
These will be passed as arguments to your function when it receives a request.
|
|
360
354
|
Note that your function must use the `event`-style function signature:
|
|
361
355
|
|
|
@@ -10,9 +10,8 @@ Python functions -- brought to you by the Google Cloud Functions team.
|
|
|
10
10
|
The Functions Framework lets you write lightweight functions that run in many
|
|
11
11
|
different environments, including:
|
|
12
12
|
|
|
13
|
-
* [Google Cloud Functions](https://cloud.google.com/functions/)
|
|
13
|
+
* [Google Cloud Run Functions](https://cloud.google.com/functions/)
|
|
14
14
|
* Your local development machine
|
|
15
|
-
* [Cloud Run and Cloud Run for Anthos](https://cloud.google.com/run/)
|
|
16
15
|
* [Knative](https://github.com/knative/)-based environments
|
|
17
16
|
|
|
18
17
|
The framework allows you to go from:
|
|
@@ -294,7 +293,7 @@ https://cloud.google.com/functions/docs/tutorials/pubsub#functions_helloworld_pu
|
|
|
294
293
|
|
|
295
294
|
## Run your function on serverless platforms
|
|
296
295
|
|
|
297
|
-
### Google Cloud
|
|
296
|
+
### Google Cloud Run functions
|
|
298
297
|
|
|
299
298
|
This Functions Framework is based on the [Python Runtime on Google Cloud Functions](https://cloud.google.com/functions/docs/concepts/python-runtime).
|
|
300
299
|
|
|
@@ -302,12 +301,6 @@ On Cloud Functions, using the Functions Framework is not necessary: you don't ne
|
|
|
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
|
|
321
|
+
## Enable Google Cloud Run function Events
|
|
329
322
|
|
|
330
323
|
The Functions Framework can unmarshall incoming
|
|
331
|
-
Google Cloud
|
|
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:
|
|
334
327
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "functions-framework"
|
|
3
|
+
version = "3.8.3"
|
|
4
|
+
description = "An open source FaaS (Function as a service) framework for writing portable Python functions -- brought to you by the Google Cloud Functions team."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.5, <4"
|
|
7
|
+
# Once we drop support for Python 3.7 and 3.8, this can become
|
|
8
|
+
# license = "Apache-2.0"
|
|
9
|
+
license = {text = "Apache-2.0"}
|
|
10
|
+
authors = [
|
|
11
|
+
{ name = "Google LLC", email = "googleapis-packages@google.com" }
|
|
12
|
+
]
|
|
13
|
+
maintainers = [
|
|
14
|
+
{ name = "Google LLC", email = "googleapis-packages@google.com" }
|
|
15
|
+
]
|
|
16
|
+
keywords = ["functions-framework"]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 5 - Production/Stable",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"Programming Language :: Python :: 3.7",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
]
|
|
27
|
+
dependencies = [
|
|
28
|
+
"flask>=2.0,<4.0",
|
|
29
|
+
"click>=7.0,<9.0",
|
|
30
|
+
"watchdog>=1.0.0",
|
|
31
|
+
"gunicorn>=22.0.0; platform_system!='Windows'",
|
|
32
|
+
"cloudevents>=1.2.0,<2.0.0",
|
|
33
|
+
"Werkzeug>=0.14,<4.0.0",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.urls]
|
|
37
|
+
Homepage = "https://github.com/googlecloudplatform/functions-framework-python"
|
|
38
|
+
|
|
39
|
+
[project.scripts]
|
|
40
|
+
ff = "functions_framework._cli:_cli"
|
|
41
|
+
functions-framework = "functions_framework._cli:_cli"
|
|
42
|
+
functions_framework = "functions_framework._cli:_cli"
|
|
43
|
+
functions-framework-python = "functions_framework._cli:_cli"
|
|
44
|
+
functions_framework_python = "functions_framework._cli:_cli"
|
|
45
|
+
|
|
46
|
+
[build-system]
|
|
47
|
+
requires = ["setuptools>=61.0.0"]
|
|
48
|
+
build-backend = "setuptools.build_meta"
|
|
49
|
+
|
|
50
|
+
[tool.setuptools.packages.find]
|
|
51
|
+
where = ["src"]
|
|
52
|
+
|
|
53
|
+
[tool.setuptools.package-data]
|
|
54
|
+
functions_framework = ["py.typed"]
|
|
55
|
+
|
|
56
|
+
[tool.setuptools.package-dir]
|
|
57
|
+
"" = "src"
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework.egg-info/PKG-INFO
RENAMED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: functions-framework
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.3
|
|
4
4
|
Summary: An open source FaaS (Function as a service) framework for writing portable Python functions -- brought to you by the Google Cloud Functions team.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Author-email: Google LLC <googleapis-packages@google.com>
|
|
6
|
+
Maintainer-email: Google LLC <googleapis-packages@google.com>
|
|
7
|
+
License: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://github.com/googlecloudplatform/functions-framework-python
|
|
8
9
|
Keywords: functions-framework
|
|
9
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
11
|
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.7
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.8
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
-
Requires-Python:
|
|
18
|
+
Requires-Python: <4,>=3.5
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist: flask<4.0,>=
|
|
21
|
+
Requires-Dist: flask<4.0,>=2.0
|
|
22
22
|
Requires-Dist: click<9.0,>=7.0
|
|
23
23
|
Requires-Dist: watchdog>=1.0.0
|
|
24
24
|
Requires-Dist: gunicorn>=22.0.0; platform_system != "Windows"
|
|
25
25
|
Requires-Dist: cloudevents<2.0.0,>=1.2.0
|
|
26
26
|
Requires-Dist: Werkzeug<4.0.0,>=0.14
|
|
27
|
+
Dynamic: license-file
|
|
27
28
|
|
|
28
29
|
# Functions Framework for Python
|
|
29
30
|
|
|
@@ -37,9 +38,8 @@ Python functions -- brought to you by the Google Cloud Functions team.
|
|
|
37
38
|
The Functions Framework lets you write lightweight functions that run in many
|
|
38
39
|
different environments, including:
|
|
39
40
|
|
|
40
|
-
* [Google Cloud Functions](https://cloud.google.com/functions/)
|
|
41
|
+
* [Google Cloud Run Functions](https://cloud.google.com/functions/)
|
|
41
42
|
* Your local development machine
|
|
42
|
-
* [Cloud Run and Cloud Run for Anthos](https://cloud.google.com/run/)
|
|
43
43
|
* [Knative](https://github.com/knative/)-based environments
|
|
44
44
|
|
|
45
45
|
The framework allows you to go from:
|
|
@@ -321,7 +321,7 @@ https://cloud.google.com/functions/docs/tutorials/pubsub#functions_helloworld_pu
|
|
|
321
321
|
|
|
322
322
|
## Run your function on serverless platforms
|
|
323
323
|
|
|
324
|
-
### Google Cloud
|
|
324
|
+
### Google Cloud Run functions
|
|
325
325
|
|
|
326
326
|
This Functions Framework is based on the [Python Runtime on Google Cloud Functions](https://cloud.google.com/functions/docs/concepts/python-runtime).
|
|
327
327
|
|
|
@@ -329,12 +329,6 @@ On Cloud Functions, using the Functions Framework is not necessary: you don't ne
|
|
|
329
329
|
|
|
330
330
|
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).
|
|
331
331
|
|
|
332
|
-
### Cloud Run/Cloud Run on GKE
|
|
333
|
-
|
|
334
|
-
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)
|
|
335
|
-
|
|
336
|
-
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).
|
|
337
|
-
|
|
338
332
|
### Container environments based on Knative
|
|
339
333
|
|
|
340
334
|
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.
|
|
@@ -352,10 +346,10 @@ You can configure the Functions Framework using command-line flags or environmen
|
|
|
352
346
|
| `--source` | `FUNCTION_SOURCE` | The path to the file containing your function. Default: `main.py` (in the current working directory) |
|
|
353
347
|
| `--debug` | `DEBUG` | A flag that allows to run functions-framework to run in debug mode, including live reloading. Default: `False` |
|
|
354
348
|
|
|
355
|
-
## Enable Google Cloud
|
|
349
|
+
## Enable Google Cloud Run function Events
|
|
356
350
|
|
|
357
351
|
The Functions Framework can unmarshall incoming
|
|
358
|
-
Google Cloud
|
|
352
|
+
Google Cloud Run functions [event](https://cloud.google.com/functions/docs/concepts/events-triggers#events) payloads to `event` and `context` objects.
|
|
359
353
|
These will be passed as arguments to your function when it receives a request.
|
|
360
354
|
Note that your function must use the `event`-style function signature:
|
|
361
355
|
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework.egg-info/SOURCES.txt
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
README.md
|
|
3
|
+
pyproject.toml
|
|
3
4
|
setup.cfg
|
|
4
|
-
setup.py
|
|
5
5
|
src/functions_framework/__init__.py
|
|
6
6
|
src/functions_framework/__main__.py
|
|
7
7
|
src/functions_framework/_cli.py
|
|
@@ -17,7 +17,6 @@ src/functions_framework.egg-info/PKG-INFO
|
|
|
17
17
|
src/functions_framework.egg-info/SOURCES.txt
|
|
18
18
|
src/functions_framework.egg-info/dependency_links.txt
|
|
19
19
|
src/functions_framework.egg-info/entry_points.txt
|
|
20
|
-
src/functions_framework.egg-info/namespace_packages.txt
|
|
21
20
|
src/functions_framework.egg-info/requires.txt
|
|
22
21
|
src/functions_framework.egg-info/top_level.txt
|
|
23
22
|
src/functions_framework/_http/__init__.py
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Copyright 2020 Google LLC
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
from io import open
|
|
16
|
-
from os import path
|
|
17
|
-
|
|
18
|
-
from setuptools import find_packages, setup
|
|
19
|
-
|
|
20
|
-
here = path.abspath(path.dirname(__file__))
|
|
21
|
-
|
|
22
|
-
# Get the long description from the README file
|
|
23
|
-
with open(path.join(here, "README.md"), encoding="utf-8") as f:
|
|
24
|
-
long_description = f.read()
|
|
25
|
-
|
|
26
|
-
setup(
|
|
27
|
-
name="functions-framework",
|
|
28
|
-
version="3.8.1",
|
|
29
|
-
description="An open source FaaS (Function as a service) framework for writing portable Python functions -- brought to you by the Google Cloud Functions team.",
|
|
30
|
-
long_description=long_description,
|
|
31
|
-
long_description_content_type="text/markdown",
|
|
32
|
-
url="https://github.com/googlecloudplatform/functions-framework-python",
|
|
33
|
-
author="Google LLC",
|
|
34
|
-
author_email="googleapis-packages@google.com",
|
|
35
|
-
classifiers=[
|
|
36
|
-
"Development Status :: 5 - Production/Stable ",
|
|
37
|
-
"Intended Audience :: Developers",
|
|
38
|
-
"License :: OSI Approved :: Apache Software License",
|
|
39
|
-
"Programming Language :: Python :: 3.7",
|
|
40
|
-
"Programming Language :: Python :: 3.8",
|
|
41
|
-
"Programming Language :: Python :: 3.9",
|
|
42
|
-
"Programming Language :: Python :: 3.10",
|
|
43
|
-
"Programming Language :: Python :: 3.11",
|
|
44
|
-
"Programming Language :: Python :: 3.12",
|
|
45
|
-
],
|
|
46
|
-
keywords="functions-framework",
|
|
47
|
-
packages=find_packages(where="src"),
|
|
48
|
-
package_data={"functions_framework": ["py.typed"]},
|
|
49
|
-
namespace_packages=["google", "google.cloud"],
|
|
50
|
-
package_dir={"": "src"},
|
|
51
|
-
python_requires=">=3.5, <4",
|
|
52
|
-
install_requires=[
|
|
53
|
-
"flask>=1.0,<4.0",
|
|
54
|
-
"click>=7.0,<9.0",
|
|
55
|
-
"watchdog>=1.0.0",
|
|
56
|
-
"gunicorn>=22.0.0; platform_system!='Windows'",
|
|
57
|
-
"cloudevents>=1.2.0,<2.0.0",
|
|
58
|
-
"Werkzeug>=0.14,<4.0.0",
|
|
59
|
-
],
|
|
60
|
-
entry_points={
|
|
61
|
-
"console_scripts": [
|
|
62
|
-
"ff=functions_framework._cli:_cli",
|
|
63
|
-
"functions-framework=functions_framework._cli:_cli",
|
|
64
|
-
"functions_framework=functions_framework._cli:_cli",
|
|
65
|
-
"functions-framework-python=functions_framework._cli:_cli",
|
|
66
|
-
"functions_framework_python=functions_framework._cli:_cli",
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_http/__init__.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_http/flask.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_http/gunicorn.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/_typed_event.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/background_event.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/event_conversion.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/exceptions.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/execution_id.py
RENAMED
|
File without changes
|
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/functions_framework/request_timeout.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions/__init__.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions/context.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions_v1/__init__.py
RENAMED
|
File without changes
|
{functions_framework-3.8.1 → functions_framework-3.8.3}/src/google/cloud/functions_v1/context.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|