crossplane-function-sdk-python 0.9.0__tar.gz → 0.10.0__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.
Files changed (36) hide show
  1. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/.github/workflows/ci.yml +12 -12
  2. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/OWNERS.md +1 -0
  3. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/PKG-INFO +3 -3
  4. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/__version__.py +1 -1
  5. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/proto/v1/run_function_pb2.py +2 -2
  6. {crossplane_function_sdk_python-0.9.0/crossplane/function/proto/v1beta1 → crossplane_function_sdk_python-0.10.0/crossplane/function/proto/v1}/run_function_pb2.pyi +2 -0
  7. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/proto/v1/run_function_pb2_grpc.py +2 -2
  8. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/proto/v1beta1/run_function_pb2.py +2 -2
  9. {crossplane_function_sdk_python-0.9.0/crossplane/function/proto/v1 → crossplane_function_sdk_python-0.10.0/crossplane/function/proto/v1beta1}/run_function_pb2.pyi +2 -0
  10. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/proto/v1beta1/run_function_pb2_grpc.py +2 -2
  11. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/runtime.py +7 -1
  12. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/pyproject.toml +4 -4
  13. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  14. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  15. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  16. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/.gitignore +0 -0
  17. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/CODEOWNERS +0 -0
  18. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/LICENSE +0 -0
  19. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/README.md +0 -0
  20. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/logging.py +0 -0
  21. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/proto/v1/run_function.proto +0 -0
  22. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/proto/v1beta1/run_function.proto +0 -0
  23. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/py.typed +0 -0
  24. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/request.py +0 -0
  25. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/resource.py +0 -0
  26. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/crossplane/function/response.py +0 -0
  27. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/renovate.json +0 -0
  28. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/test_request.py +0 -0
  29. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/test_resource.py +0 -0
  30. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/test_response.py +0 -0
  31. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/test_runtime.py +0 -0
  32. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/testdata/models/io/k8s/apimachinery/pkg/apis/__init__.py +0 -0
  33. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/testdata/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py +0 -0
  34. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/testdata/models/io/k8s/apimachinery/pkg/apis/meta/v1.py +0 -0
  35. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/testdata/models/io/upbound/aws/s3/__init__.py +0 -0
  36. {crossplane_function_sdk_python-0.9.0 → crossplane_function_sdk_python-0.10.0}/tests/testdata/models/io/upbound/aws/s3/v1beta2.py +0 -0
@@ -38,10 +38,10 @@ jobs:
38
38
  runs-on: ubuntu-24.04
39
39
  steps:
40
40
  - name: Checkout
41
- uses: actions/checkout@v4
41
+ uses: actions/checkout@v6
42
42
 
43
43
  - name: Setup Python
44
- uses: actions/setup-python@v5
44
+ uses: actions/setup-python@v6
45
45
  with:
46
46
  python-version: ${{ env.PYTHON_VERSION }}
47
47
 
@@ -55,10 +55,10 @@ jobs:
55
55
  runs-on: ubuntu-24.04
56
56
  steps:
57
57
  - name: Checkout
58
- uses: actions/checkout@v4
58
+ uses: actions/checkout@v6
59
59
 
60
60
  - name: Setup Python
61
- uses: actions/setup-python@v5
61
+ uses: actions/setup-python@v6
62
62
  with:
63
63
  python-version: ${{ env.PYTHON_VERSION }}
64
64
 
@@ -73,10 +73,10 @@ jobs:
73
73
  runs-on: ubuntu-24.04
74
74
  steps:
75
75
  - name: Checkout
76
- uses: actions/checkout@v4
76
+ uses: actions/checkout@v6
77
77
 
78
78
  - name: Setup Python
79
- uses: actions/setup-python@v5
79
+ uses: actions/setup-python@v6
80
80
  with:
81
81
  python-version: ${{ env.PYTHON_VERSION }}
82
82
 
@@ -98,7 +98,7 @@ jobs:
98
98
  run: hatch build
99
99
 
100
100
  - name: Upload Sdist and Wheel to GitHub
101
- uses: actions/upload-artifact@v4
101
+ uses: actions/upload-artifact@v5
102
102
  with:
103
103
  name: dist
104
104
  path: "dist/*"
@@ -114,13 +114,13 @@ jobs:
114
114
  runs-on: ubuntu-24.04
115
115
  steps:
116
116
  - name: Download Sdist and Wheel from GitHub
117
- uses: actions/download-artifact@v5
117
+ uses: actions/download-artifact@v6
118
118
  with:
119
119
  name: dist
120
120
  path: "dist"
121
121
 
122
122
  - name: Publish to PyPI
123
- uses: pypa/gh-action-pypi-publish@v1.12.4
123
+ uses: pypa/gh-action-pypi-publish@v1.13.0
124
124
  with:
125
125
  # Note that this is currently being pushed to the 'crossplane' PyPI
126
126
  # user (not org). See @negz if you need access - PyPI requires 2FA to
@@ -136,10 +136,10 @@ jobs:
136
136
  runs-on: ubuntu-24.04
137
137
  steps:
138
138
  - name: Checkout
139
- uses: actions/checkout@v4
139
+ uses: actions/checkout@v6
140
140
 
141
141
  - name: Setup Python
142
- uses: actions/setup-python@v5
142
+ uses: actions/setup-python@v6
143
143
  with:
144
144
  python-version: ${{ env.PYTHON_VERSION }}
145
145
 
@@ -153,7 +153,7 @@ jobs:
153
153
  uses: actions/configure-pages@v5
154
154
 
155
155
  - name: Upload artifact
156
- uses: actions/upload-pages-artifact@v3
156
+ uses: actions/upload-pages-artifact@v4
157
157
  with:
158
158
  path: docs
159
159
 
@@ -13,6 +13,7 @@ repository maintainers in their own `OWNERS.md` file.
13
13
  ## Maintainers
14
14
  * Nic Cope <negz@upbound.com> ([negz](https://github.com/negz))
15
15
  * Bob Haddleton <bob.haddleton@nokia.com> ([bobh66](https://github.com/bobh66))
16
+ * Patrick J. McNerthney <pat@mcnerthney.com> ([iciclespider](https://github.com/iciclespider))
16
17
 
17
18
 
18
19
  See [CODEOWNERS](./CODEOWNERS) for automatic PR assignment.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crossplane-function-sdk-python
3
- Version: 0.9.0
3
+ Version: 0.10.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
@@ -14,8 +14,8 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Typing :: Typed
15
15
  Requires-Python: >=3.11
16
16
  Requires-Dist: grpcio-reflection==1.*
17
- Requires-Dist: grpcio==1.74.0
18
- Requires-Dist: protobuf==6.31.1
17
+ Requires-Dist: grpcio==1.76.0
18
+ Requires-Dist: protobuf==6.33.1
19
19
  Requires-Dist: pydantic==2.*
20
20
  Requires-Dist: structlog==25.*
21
21
  Description-Content-Type: text/markdown
@@ -15,4 +15,4 @@
15
15
  """The version of function-sdk-python."""
16
16
 
17
17
  # This is set at build time, using "hatch version"
18
- __version__ = "0.9.0"
18
+ __version__ = "0.10.0"
@@ -2,7 +2,7 @@
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
4
  # source: crossplane/function/proto/v1/run_function.proto
5
- # Protobuf Python Version: 6.31.0
5
+ # Protobuf Python Version: 6.31.1
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
8
8
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -13,7 +13,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
13
13
  _runtime_version.Domain.PUBLIC,
14
14
  6,
15
15
  31,
16
- 0,
16
+ 1,
17
17
  '',
18
18
  'crossplane/function/proto/v1/run_function.proto'
19
19
  )
@@ -1,3 +1,5 @@
1
+ import datetime
2
+
1
3
  from google.protobuf import duration_pb2 as _duration_pb2
2
4
  from google.protobuf import struct_pb2 as _struct_pb2
3
5
  from google.protobuf.internal import containers as _containers
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from crossplane.function.proto.v1 import run_function_pb2 as crossplane_dot_function_dot_proto_dot_v1_dot_run__function__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.73.1'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in crossplane/function/proto/v1/run_function_pb2_grpc.py depends on'
21
+ + ' but the generated code in crossplane/function/proto/v1/run_function_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -2,7 +2,7 @@
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # NO CHECKED-IN PROTOBUF GENCODE
4
4
  # source: crossplane/function/proto/v1beta1/run_function.proto
5
- # Protobuf Python Version: 6.31.0
5
+ # Protobuf Python Version: 6.31.1
6
6
  """Generated protocol buffer code."""
7
7
  from google.protobuf import descriptor as _descriptor
8
8
  from google.protobuf import descriptor_pool as _descriptor_pool
@@ -13,7 +13,7 @@ _runtime_version.ValidateProtobufRuntimeVersion(
13
13
  _runtime_version.Domain.PUBLIC,
14
14
  6,
15
15
  31,
16
- 0,
16
+ 1,
17
17
  '',
18
18
  'crossplane/function/proto/v1beta1/run_function.proto'
19
19
  )
@@ -1,3 +1,5 @@
1
+ import datetime
2
+
1
3
  from google.protobuf import duration_pb2 as _duration_pb2
2
4
  from google.protobuf import struct_pb2 as _struct_pb2
3
5
  from google.protobuf.internal import containers as _containers
@@ -5,7 +5,7 @@ import warnings
5
5
 
6
6
  from crossplane.function.proto.v1beta1 import run_function_pb2 as crossplane_dot_function_dot_proto_dot_v1beta1_dot_run__function__pb2
7
7
 
8
- GRPC_GENERATED_VERSION = '1.73.1'
8
+ GRPC_GENERATED_VERSION = '1.76.0'
9
9
  GRPC_VERSION = grpc.__version__
10
10
  _version_not_supported = False
11
11
 
@@ -18,7 +18,7 @@ except ImportError:
18
18
  if _version_not_supported:
19
19
  raise RuntimeError(
20
20
  f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in crossplane/function/proto/v1beta1/run_function_pb2_grpc.py depends on'
21
+ + ' but the generated code in crossplane/function/proto/v1beta1/run_function_pb2_grpc.py depends on'
22
22
  + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
23
  + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
24
  + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
@@ -17,6 +17,8 @@
17
17
  import asyncio
18
18
  import os
19
19
  import signal
20
+ from collections.abc import Sequence
21
+ from typing import Any
20
22
 
21
23
  import grpc
22
24
  from grpc_reflection.v1alpha import reflection
@@ -73,6 +75,7 @@ def serve(
73
75
  *,
74
76
  creds: grpc.ServerCredentials,
75
77
  insecure: bool,
78
+ options: Sequence[tuple[str, Any]] | None = None,
76
79
  ) -> None:
77
80
  """Start a gRPC server and serve requests asychronously.
78
81
 
@@ -81,6 +84,9 @@ def serve(
81
84
  address: The address at which to listen for requests.
82
85
  creds: The credentials used to authenticate requests.
83
86
  insecure: Serve insecurely, without credentials or encryption.
87
+ options: Additional gRPC server options. Eg. set max receive message
88
+ size to 5Mb (default is 4Mb):
89
+ [("grpc.max_receive_message_length", 1024 * 1024 * 5)]
84
90
 
85
91
  Raises:
86
92
  ValueError if creds is None and insecure is False.
@@ -91,7 +97,7 @@ def serve(
91
97
  # Define the loop before the server so everything uses the same loop.
92
98
  loop = asyncio.get_event_loop()
93
99
 
94
- server = grpc.aio.server()
100
+ server = grpc.aio.server(options=options)
95
101
 
96
102
  loop.add_signal_handler(
97
103
  signal.SIGTERM,
@@ -18,9 +18,9 @@ classifiers = [
18
18
  ]
19
19
 
20
20
  dependencies = [
21
- "grpcio==1.74.0",
21
+ "grpcio==1.76.0",
22
22
  "grpcio-reflection==1.*",
23
- "protobuf==6.31.1", # Must be compatible with grpcio-tools.
23
+ "protobuf==6.33.1", # Must be compatible with grpcio-tools.
24
24
  "pydantic==2.*",
25
25
  "structlog==25.*",
26
26
  ]
@@ -46,8 +46,8 @@ type = "virtual"
46
46
  detached = true
47
47
  path = ".venv-generate"
48
48
  dependencies = [
49
- "grpcio-tools==1.74.0",
50
- "protobuf==6.31.1",
49
+ "grpcio-tools==1.76.0",
50
+ "protobuf==6.33.1",
51
51
  ]
52
52
 
53
53
  [tool.hatch.envs.generate.scripts]