crossplane-function-sdk-python 0.13.0__py3-none-any.whl → 0.14.0__py3-none-any.whl
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.
- crossplane/function/__version__.py +1 -1
- crossplane/function/response.py +6 -3
- crossplane/function/runtime.py +5 -5
- {crossplane_function_sdk_python-0.13.0.dist-info → crossplane_function_sdk_python-0.14.0.dist-info}/METADATA +1 -1
- {crossplane_function_sdk_python-0.13.0.dist-info → crossplane_function_sdk_python-0.14.0.dist-info}/RECORD +7 -7
- {crossplane_function_sdk_python-0.13.0.dist-info → crossplane_function_sdk_python-0.14.0.dist-info}/WHEEL +0 -0
- {crossplane_function_sdk_python-0.13.0.dist-info → crossplane_function_sdk_python-0.14.0.dist-info}/licenses/LICENSE +0 -0
crossplane/function/response.py
CHANGED
|
@@ -163,13 +163,16 @@ def require_resources( # noqa: PLR0913
|
|
|
163
163
|
namespace: The namespace to search in (optional).
|
|
164
164
|
|
|
165
165
|
Raises:
|
|
166
|
-
ValueError: If both match_name and match_labels are provided
|
|
166
|
+
ValueError: If both match_name and match_labels are provided.
|
|
167
167
|
|
|
168
168
|
This tells Crossplane to fetch the specified resources and include them
|
|
169
169
|
in the next call to the function in req.required_resources[name].
|
|
170
|
+
|
|
171
|
+
If neither match_name nor match_labels is provided, all resources of the
|
|
172
|
+
given api_version and kind are matched.
|
|
170
173
|
"""
|
|
171
|
-
if
|
|
172
|
-
msg = "
|
|
174
|
+
if match_name is not None and match_labels is not None:
|
|
175
|
+
msg = "match_name and match_labels are mutually exclusive"
|
|
173
176
|
raise ValueError(msg)
|
|
174
177
|
|
|
175
178
|
selector = fnv1.ResourceSelector(
|
crossplane/function/runtime.py
CHANGED
|
@@ -70,7 +70,7 @@ def load_credentials(tls_certs_dir: str) -> grpc.ServerCredentials:
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
def serve(
|
|
73
|
-
function: grpcv1.
|
|
73
|
+
function: grpcv1.FunctionRunnerServiceServicer,
|
|
74
74
|
address: str,
|
|
75
75
|
*,
|
|
76
76
|
creds: grpc.ServerCredentials,
|
|
@@ -134,20 +134,20 @@ def serve(
|
|
|
134
134
|
loop.close()
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
class BetaFunctionRunner(grpcv1beta1.
|
|
137
|
+
class BetaFunctionRunner(grpcv1beta1.FunctionRunnerServiceServicer):
|
|
138
138
|
"""A BetaFunctionRunner handles beta gRPC RunFunctionRequests.
|
|
139
139
|
|
|
140
|
-
It handles requests by passing them to a wrapped v1.
|
|
140
|
+
It handles requests by passing them to a wrapped v1.FunctionRunnerServiceServicer.
|
|
141
141
|
Incoming v1beta1 requests are converted to v1 by round-tripping them through
|
|
142
142
|
serialization. Outgoing requests are converted from v1 to v1beta1 the same
|
|
143
143
|
way.
|
|
144
144
|
"""
|
|
145
145
|
|
|
146
|
-
def __init__(self, wrapped: grpcv1.
|
|
146
|
+
def __init__(self, wrapped: grpcv1.FunctionRunnerServiceServicer):
|
|
147
147
|
"""Create a new BetaFunctionRunner."""
|
|
148
148
|
self.wrapped = wrapped
|
|
149
149
|
|
|
150
|
-
async def RunFunction( # noqa: N802 # gRPC requires this name.
|
|
150
|
+
async def RunFunction( # noqa: N802 # gRPC requires this name. # pyright: ignore[reportIncompatibleMethodOverride]
|
|
151
151
|
self, req: fnv1beta1.RunFunctionRequest, context: grpc.aio.ServicerContext
|
|
152
152
|
) -> fnv1beta1.RunFunctionResponse:
|
|
153
153
|
"""Run the underlying function."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crossplane-function-sdk-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.0
|
|
4
4
|
Summary: The Python SDK for Crossplane composition functions
|
|
5
5
|
Project-URL: Documentation, https://github.com/crossplane/function-sdk-python#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/crossplane/function-sdk-python/issues
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
crossplane/function/__version__.py,sha256=
|
|
1
|
+
crossplane/function/__version__.py,sha256=oKtus0bQUO42aKqWWxuhQxgBpNDRCrC6BLgLMdh_1Vk,705
|
|
2
2
|
crossplane/function/logging.py,sha256=Zawqq36FBzjkVg4bJ3VGK12-so7N8yAMoSPrhdwpBSA,2503
|
|
3
3
|
crossplane/function/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
crossplane/function/request.py,sha256=ncgGTyAvBOdZ8M7KPy_H9pL08_cYzKJ3D9q_rnSjPXo,8199
|
|
5
5
|
crossplane/function/resource.py,sha256=D9OWyzfQNZhPQFDDFDBqva9bPiKV2nRuivG_L1mBjv4,8386
|
|
6
|
-
crossplane/function/response.py,sha256=
|
|
7
|
-
crossplane/function/runtime.py,sha256=
|
|
6
|
+
crossplane/function/response.py,sha256=H5LnyBBTs6ZGmRfMOXew3o_3DkMEfhi77xG6xGZ8NLo,7072
|
|
7
|
+
crossplane/function/runtime.py,sha256=2Is5E2XuJibWH0CLULhJ_cmMcRYDeBApypZca97l8Xw,5499
|
|
8
8
|
crossplane/function/proto/v1/run_function.proto,sha256=GbJ0wVUEjfpMsn2DsnhiPvtmL09z3oyMbWwf6viQtiw,16676
|
|
9
9
|
crossplane/function/proto/v1/run_function_pb2.py,sha256=eeQajHePjvswGCEH2FRxyr8P-K0Go55U5L4rAa32JA8,14440
|
|
10
10
|
crossplane/function/proto/v1/run_function_pb2.pyi,sha256=MvjcY39d1xJ4ZZmRibhehCKF1mHVGb6qfpoCQO8XYqE,14374
|
|
@@ -13,7 +13,7 @@ crossplane/function/proto/v1beta1/run_function.proto,sha256=EVYIEQCiPu1eOdGJQ3tu
|
|
|
13
13
|
crossplane/function/proto/v1beta1/run_function_pb2.py,sha256=G4TTK_cYTOQlRN5byADcEFPjTILYYWj3b4m19iiPO4g,14664
|
|
14
14
|
crossplane/function/proto/v1beta1/run_function_pb2.pyi,sha256=MvjcY39d1xJ4ZZmRibhehCKF1mHVGb6qfpoCQO8XYqE,14374
|
|
15
15
|
crossplane/function/proto/v1beta1/run_function_pb2_grpc.py,sha256=Hj5KCSTyT_vIpTXWwc5MwiKxwxaOhjbfY5Iedidx9AQ,4033
|
|
16
|
-
crossplane_function_sdk_python-0.
|
|
17
|
-
crossplane_function_sdk_python-0.
|
|
18
|
-
crossplane_function_sdk_python-0.
|
|
19
|
-
crossplane_function_sdk_python-0.
|
|
16
|
+
crossplane_function_sdk_python-0.14.0.dist-info/METADATA,sha256=I3UMTU0jZB9yFSy_w0zy65iIcNgkccljVz2dxGClTUU,3244
|
|
17
|
+
crossplane_function_sdk_python-0.14.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
18
|
+
crossplane_function_sdk_python-0.14.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
19
|
+
crossplane_function_sdk_python-0.14.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|