frequenz-client-base 0.8.1__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 (27) hide show
  1. frequenz_client_base-0.10.0/PKG-INFO +94 -0
  2. frequenz_client_base-0.10.0/RELEASE_NOTES.md +20 -0
  3. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/pyproject.toml +34 -28
  4. frequenz_client_base-0.10.0/src/frequenz/client/base/authentication.py +116 -0
  5. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/channel.py +46 -10
  6. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/client.py +4 -1
  7. frequenz_client_base-0.10.0/src/frequenz/client/base/signing.py +158 -0
  8. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/streaming.py +15 -2
  9. frequenz_client_base-0.10.0/src/frequenz_client_base.egg-info/PKG-INFO +94 -0
  10. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz_client_base.egg-info/SOURCES.txt +2 -0
  11. frequenz_client_base-0.10.0/src/frequenz_client_base.egg-info/requires.txt +56 -0
  12. frequenz-client-base-0.8.1/PKG-INFO +0 -53
  13. frequenz-client-base-0.8.1/RELEASE_NOTES.md +0 -17
  14. frequenz-client-base-0.8.1/src/frequenz_client_base.egg-info/PKG-INFO +0 -53
  15. frequenz-client-base-0.8.1/src/frequenz_client_base.egg-info/requires.txt +0 -56
  16. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/LICENSE +0 -0
  17. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/MANIFEST.in +0 -0
  18. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/README.md +0 -0
  19. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/setup.cfg +0 -0
  20. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/__init__.py +0 -0
  21. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/conftest.py +0 -0
  22. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/conversion.py +0 -0
  23. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/exception.py +0 -0
  24. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/py.typed +0 -0
  25. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz/client/base/retry.py +0 -0
  26. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz_client_base.egg-info/dependency_links.txt +0 -0
  27. {frequenz-client-base-0.8.1 → frequenz_client_base-0.10.0}/src/frequenz_client_base.egg-info/top_level.txt +0 -0
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: frequenz-client-base
3
+ Version: 0.10.0
4
+ Summary: Utilities for writing Frequenz API clients
5
+ Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
6
+ License: MIT
7
+ Project-URL: Documentation, https://frequenz-floss.github.io/frequenz-client-base-python/
8
+ Project-URL: Changelog, https://github.com/frequenz-floss/frequenz-client-base-python/releases
9
+ Project-URL: Issues, https://github.com/frequenz-floss/frequenz-client-base-python/issues
10
+ Project-URL: Repository, https://github.com/frequenz-floss/frequenz-client-base-python
11
+ Project-URL: Support, https://github.com/frequenz-floss/frequenz-client-base-python/discussions/categories/support
12
+ Keywords: frequenz,python,lib,library,client-base
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Topic :: Software Development :: Libraries
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: <4,>=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: frequenz-channels<2,>=1.6.1
24
+ Requires-Dist: grpcio<2,>=1.59
25
+ Requires-Dist: protobuf<7,>=5.29.2
26
+ Requires-Dist: typing-extensions<5,>=4.6.0
27
+ Provides-Extra: dev-flake8
28
+ Requires-Dist: flake8==7.2.0; extra == "dev-flake8"
29
+ Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
30
+ Requires-Dist: flake8-pyproject==1.2.3; extra == "dev-flake8"
31
+ Requires-Dist: pydoclint==0.6.6; extra == "dev-flake8"
32
+ Requires-Dist: pydocstyle==6.3.0; extra == "dev-flake8"
33
+ Requires-Dist: frequenz-client-base; extra == "dev-flake8"
34
+ Provides-Extra: dev-formatting
35
+ Requires-Dist: black==25.1.0; extra == "dev-formatting"
36
+ Requires-Dist: isort==6.0.1; extra == "dev-formatting"
37
+ Provides-Extra: dev-mkdocs
38
+ Requires-Dist: black==25.1.0; extra == "dev-mkdocs"
39
+ Requires-Dist: Markdown==3.8; extra == "dev-mkdocs"
40
+ Requires-Dist: mike==2.1.3; extra == "dev-mkdocs"
41
+ Requires-Dist: mkdocs-gen-files==0.5.0; extra == "dev-mkdocs"
42
+ Requires-Dist: mkdocs-literate-nav==0.6.2; extra == "dev-mkdocs"
43
+ Requires-Dist: mkdocs-macros-plugin==1.3.7; extra == "dev-mkdocs"
44
+ Requires-Dist: mkdocs-material==9.6.12; extra == "dev-mkdocs"
45
+ Requires-Dist: mkdocstrings[python]==0.29.1; extra == "dev-mkdocs"
46
+ Requires-Dist: mkdocstrings-python==1.16.10; extra == "dev-mkdocs"
47
+ Requires-Dist: frequenz-repo-config[lib]==0.13.3; extra == "dev-mkdocs"
48
+ Requires-Dist: frequenz-client-base; extra == "dev-mkdocs"
49
+ Provides-Extra: dev-mypy
50
+ Requires-Dist: mypy==1.15.0; extra == "dev-mypy"
51
+ Requires-Dist: types-Markdown==3.8.0.20250415; extra == "dev-mypy"
52
+ Requires-Dist: types-protobuf==5.29.1.20250403; extra == "dev-mypy"
53
+ Requires-Dist: grpc-stubs==1.53.0.6; extra == "dev-mypy"
54
+ Requires-Dist: frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-mypy"
55
+ Provides-Extra: dev-noxfile
56
+ Requires-Dist: nox==2025.5.1; extra == "dev-noxfile"
57
+ Requires-Dist: frequenz-repo-config[lib]==0.13.3; extra == "dev-noxfile"
58
+ Provides-Extra: dev-pylint
59
+ Requires-Dist: pylint==3.3.6; extra == "dev-pylint"
60
+ Requires-Dist: frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
61
+ Provides-Extra: dev-pytest
62
+ Requires-Dist: pytest==8.3.5; extra == "dev-pytest"
63
+ Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.13.3; extra == "dev-pytest"
64
+ Requires-Dist: pytest-mock==3.14.0; extra == "dev-pytest"
65
+ Requires-Dist: pytest-asyncio==0.26.0; extra == "dev-pytest"
66
+ Requires-Dist: async-solipsism==0.7; extra == "dev-pytest"
67
+ Requires-Dist: hypothesis==6.131.9; extra == "dev-pytest"
68
+ Requires-Dist: frequenz-client-base; extra == "dev-pytest"
69
+ Provides-Extra: dev
70
+ Requires-Dist: frequenz-client-base[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]; extra == "dev"
71
+ Dynamic: license-file
72
+
73
+ # Frequenz Client Base Library
74
+
75
+ [![Build Status](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml/badge.svg)](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml)
76
+ [![PyPI Package](https://img.shields.io/pypi/v/frequenz-client-base)](https://pypi.org/project/frequenz-client-base/)
77
+ [![Docs](https://img.shields.io/badge/docs-latest-informational)](https://frequenz-floss.github.io/frequenz-client-base-python/)
78
+
79
+ ## Introduction
80
+
81
+ Utilities for writing Frequenz API clients
82
+
83
+ ## Supported Platforms
84
+
85
+ The following platforms are officially supported (tested):
86
+
87
+ - **Python:** 3.11
88
+ - **Operating System:** Ubuntu Linux 20.04
89
+ - **Architectures:** amd64, arm64
90
+
91
+ ## Contributing
92
+
93
+ If you want to know how to build this project and contribute to it, please
94
+ check out the [Contributing Guide](CONTRIBUTING.md).
@@ -0,0 +1,20 @@
1
+ # Frequenz Client Base Library Release Notes
2
+
3
+ ## Features
4
+
5
+ * Added support for HMAC signing of `UnaryUnary` client messages
6
+ * Added support for HMAC signing of `UnaryStream` client messages
7
+
8
+ ## Upgrading
9
+
10
+ * Updated `protobuf` dependency range: changed from `>=4.21.6, <6` to `>=5.29.2, <7`
11
+ * The minimum dependency for `typing-extensions` is now `4.6.0` to be compatible with Python 3.12
12
+ * The minimum dependency for `grpcio` is now `1.59` to be compatible with Python 3.12
13
+
14
+ ## Bug Fixes
15
+
16
+ * Fixed keys of signature to match what fuse-rs expects
17
+ * `GrpcStreamBroadcaster` will now correctly try to restart on unexpected errors.
18
+
19
+ Before if an unexpected exception was raised by the stream method, the
20
+ internal task would silently finish and never start again.
@@ -3,9 +3,9 @@
3
3
 
4
4
  [build-system]
5
5
  requires = [
6
- "setuptools == 68.1.0",
7
- "setuptools_scm[toml] == 7.1.0",
8
- "frequenz-repo-config[lib] == 0.10.0",
6
+ "setuptools == 80.3.1",
7
+ "setuptools_scm[toml] == 8.3.1",
8
+ "frequenz-repo-config[lib] == 0.13.3",
9
9
  ]
10
10
  build-backend = "setuptools.build_meta"
11
11
 
@@ -26,10 +26,10 @@ classifiers = [
26
26
  ]
27
27
  requires-python = ">= 3.11, < 4"
28
28
  dependencies = [
29
- "frequenz-channels >= v1.0.0-rc1, < 2",
30
- "grpcio >= 1.54.2, < 2",
31
- "protobuf >= 4.21.6, < 6",
32
- "typing-extensions >= 4.5.0, < 5",
29
+ "frequenz-channels >= 1.6.1, < 2",
30
+ "grpcio >= 1.59, < 2",
31
+ "protobuf >= 5.29.2, < 7",
32
+ "typing-extensions >= 4.6.0, < 5",
33
33
  ]
34
34
  dynamic = ["version"]
35
35
 
@@ -39,48 +39,48 @@ email = "floss@frequenz.com"
39
39
 
40
40
  [project.optional-dependencies]
41
41
  dev-flake8 = [
42
- "flake8 == 7.1.1",
42
+ "flake8 == 7.2.0",
43
43
  "flake8-docstrings == 1.7.0",
44
- "flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
45
- "pydoclint == 0.5.9",
44
+ "flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
45
+ "pydoclint == 0.6.6",
46
46
  "pydocstyle == 6.3.0",
47
47
  "frequenz-client-base",
48
48
  ]
49
- dev-formatting = ["black == 24.10.0", "isort == 5.13.2"]
49
+ dev-formatting = ["black == 25.1.0", "isort == 6.0.1"]
50
50
  dev-mkdocs = [
51
- "black == 24.10.0",
52
- "Markdown==3.7",
51
+ "black == 25.1.0",
52
+ "Markdown==3.8",
53
53
  "mike == 2.1.3",
54
54
  "mkdocs-gen-files == 0.5.0",
55
- "mkdocs-literate-nav == 0.6.1",
55
+ "mkdocs-literate-nav == 0.6.2",
56
56
  "mkdocs-macros-plugin == 1.3.7",
57
- "mkdocs-material == 9.5.43",
58
- "mkdocstrings[python] == 0.26.2",
59
- "mkdocstrings-python == 1.12.2",
60
- "frequenz-repo-config[lib] == 0.10.0",
57
+ "mkdocs-material == 9.6.12",
58
+ "mkdocstrings[python] == 0.29.1",
59
+ "mkdocstrings-python == 1.16.10",
60
+ "frequenz-repo-config[lib] == 0.13.3",
61
61
  "frequenz-client-base",
62
62
  ]
63
63
  dev-mypy = [
64
- "mypy == 1.13.0",
65
- "types-Markdown == 3.7.0.20240822",
66
- "types-protobuf == 5.28.3.20241030",
67
- "grpc-stubs == 1.53.0.5", # This dependency introduces breaking changes in patch releases
64
+ "mypy == 1.15.0",
65
+ "types-Markdown == 3.8.0.20250415",
66
+ "types-protobuf == 5.29.1.20250403",
67
+ "grpc-stubs == 1.53.0.6", # This dependency introduces breaking changes in patch releases
68
68
  # For checking the noxfile, docs/ script, and tests
69
69
  "frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]",
70
70
  ]
71
- dev-noxfile = ["nox == 2024.10.9", "frequenz-repo-config[lib] == 0.10.0"]
71
+ dev-noxfile = ["nox == 2025.5.1", "frequenz-repo-config[lib] == 0.13.3"]
72
72
  dev-pylint = [
73
- "pylint == 3.3.1",
73
+ "pylint == 3.3.6",
74
74
  # For checking the noxfile, docs/ script, and tests
75
75
  "frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]",
76
76
  ]
77
77
  dev-pytest = [
78
- "pytest == 8.3.3",
79
- "frequenz-repo-config[extra-lint-examples] == 0.10.0",
78
+ "pytest == 8.3.5",
79
+ "frequenz-repo-config[extra-lint-examples] == 0.13.3",
80
80
  "pytest-mock == 3.14.0",
81
- "pytest-asyncio == 0.24.0",
81
+ "pytest-asyncio == 0.26.0",
82
82
  "async-solipsism == 0.7",
83
- "hypothesis == 6.116.0",
83
+ "hypothesis == 6.131.9",
84
84
  "frequenz-client-base",
85
85
  ]
86
86
  dev = [
@@ -138,6 +138,8 @@ disable = [
138
138
  "unsubscriptable-object",
139
139
  # Checked by mypy
140
140
  "no-member",
141
+ "possibly-used-before-assignment",
142
+ "no-name-in-module",
141
143
  # Checked by flake8
142
144
  "f-string-without-interpolation",
143
145
  "redefined-outer-name",
@@ -148,11 +150,15 @@ disable = [
148
150
  "unnecessary-lambda-assignment",
149
151
  # Checked by mypy
150
152
  "no-member",
153
+ "possibly-used-before-assignment",
154
+ "no-name-in-module",
151
155
  ]
152
156
 
153
157
  [tool.pytest.ini_options]
158
+ addopts = "-W=all -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning -vv"
154
159
  testpaths = ["tests", "src"]
155
160
  asyncio_mode = "auto"
161
+ asyncio_default_fixture_loop_scope = "function"
156
162
  required_plugins = ["pytest-asyncio", "pytest-mock"]
157
163
 
158
164
  [tool.mypy]
@@ -0,0 +1,116 @@
1
+ # License: MIT
2
+ # Copyright © 2025 Frequenz Energy-as-a-Service GmbH
3
+
4
+ """An Interceptor that adds the API key to a gRPC call."""
5
+
6
+ import dataclasses
7
+ from typing import AsyncIterable, Callable
8
+
9
+ from grpc.aio import (
10
+ ClientCallDetails,
11
+ Metadata,
12
+ UnaryStreamCall,
13
+ UnaryStreamClientInterceptor,
14
+ UnaryUnaryCall,
15
+ UnaryUnaryClientInterceptor,
16
+ )
17
+
18
+
19
+ def _add_auth_header(
20
+ key: str,
21
+ client_call_details: ClientCallDetails,
22
+ ) -> None:
23
+ """Add the API key as a metadata field to the call.
24
+
25
+ The API key is used by the later sign interceptor to calculate the HMAC.
26
+ In addition it is used as a first layer of authentication by the server.
27
+
28
+ Args:
29
+ key: The API key to use for the service.
30
+ client_call_details: The call details.
31
+ """
32
+ if client_call_details.metadata is None:
33
+ client_call_details.metadata = Metadata()
34
+
35
+ client_call_details.metadata["key"] = key
36
+
37
+
38
+ @dataclasses.dataclass(frozen=True)
39
+ class AuthenticationOptions:
40
+ """Options for authenticating to the endpoint."""
41
+
42
+ api_key: str
43
+ """The API key to authenticate with."""
44
+
45
+
46
+ # There is an issue in gRPC which means the type can not be specified correctly here.
47
+ class AuthenticationInterceptorUnaryUnary(UnaryUnaryClientInterceptor): # type: ignore[type-arg]
48
+ """An Interceptor that adds HMAC authentication of the metadata fields to a gRPC call."""
49
+
50
+ def __init__(self, options: AuthenticationOptions):
51
+ """Create an instance of the interceptor.
52
+
53
+ Args:
54
+ options: The options for authenticating to the endpoint.
55
+ """
56
+ self._key = options.api_key
57
+
58
+ async def intercept_unary_unary(
59
+ self,
60
+ continuation: Callable[
61
+ [ClientCallDetails, object], UnaryUnaryCall[object, object]
62
+ ],
63
+ client_call_details: ClientCallDetails,
64
+ request: object,
65
+ ) -> object:
66
+ """Intercept the call to add HMAC authentication to the metadata fields.
67
+
68
+ This is a known method from the base class that is overridden.
69
+
70
+ Args:
71
+ continuation: The next interceptor in the chain.
72
+ client_call_details: The call details.
73
+ request: The request object.
74
+
75
+ Returns:
76
+ The response object (this implementation does not modify the response).
77
+ """
78
+ _add_auth_header(self._key, client_call_details)
79
+ return await continuation(client_call_details, request)
80
+
81
+
82
+ # There is an issue in gRPC which means the type can not be specified correctly here.
83
+ class AuthenticationInterceptorUnaryStream(UnaryStreamClientInterceptor): # type: ignore[type-arg]
84
+ """An Interceptor that adds HMAC authentication of the metadata fields to a gRPC call."""
85
+
86
+ def __init__(self, options: AuthenticationOptions):
87
+ """Create an instance of the interceptor.
88
+
89
+ Args:
90
+ options: The options for authenticating to the endpoint.
91
+ """
92
+ self._key = options.api_key
93
+
94
+ async def intercept_unary_stream(
95
+ self,
96
+ continuation: Callable[
97
+ [ClientCallDetails, object], UnaryStreamCall[object, object]
98
+ ],
99
+ client_call_details: ClientCallDetails,
100
+ request: object,
101
+ ) -> AsyncIterable[object] | UnaryStreamCall[object, object]:
102
+ """Intercept the call to add HMAC authentication to the metadata fields.
103
+
104
+ This is a known method from the base class that is overridden.
105
+
106
+ Args:
107
+ continuation: The next interceptor in the chain.
108
+ client_call_details: The call details.
109
+ request: The request object.
110
+
111
+ Returns:
112
+ The response object (this implementation does not modify the response).
113
+ """
114
+ _add_auth_header(self._key, client_call_details)
115
+
116
+ return await continuation(client_call_details, request) # type: ignore
@@ -10,7 +10,23 @@ from typing import assert_never
10
10
  from urllib.parse import parse_qs, urlparse
11
11
 
12
12
  from grpc import ssl_channel_credentials
13
- from grpc.aio import Channel, insecure_channel, secure_channel
13
+ from grpc.aio import (
14
+ Channel,
15
+ ClientInterceptor,
16
+ insecure_channel,
17
+ secure_channel,
18
+ )
19
+
20
+ from .authentication import (
21
+ AuthenticationInterceptorUnaryStream,
22
+ AuthenticationInterceptorUnaryUnary,
23
+ AuthenticationOptions,
24
+ )
25
+ from .signing import (
26
+ SigningInterceptorUnaryStream,
27
+ SigningInterceptorUnaryUnary,
28
+ SigningOptions,
29
+ )
14
30
 
15
31
 
16
32
  @dataclasses.dataclass(frozen=True)
@@ -69,6 +85,12 @@ class ChannelOptions:
69
85
  keep_alive: KeepAliveOptions = KeepAliveOptions()
70
86
  """HTTP2 keep-alive options for the channel."""
71
87
 
88
+ sign: SigningOptions | None = None
89
+ """Signing options for the channel."""
90
+
91
+ auth: AuthenticationOptions | None = None
92
+ """Authentication options for the channel."""
93
+
72
94
 
73
95
  def parse_grpc_uri(
74
96
  uri: str,
@@ -177,6 +199,19 @@ def parse_grpc_uri(
177
199
  else None
178
200
  )
179
201
 
202
+ interceptors: list[ClientInterceptor] = []
203
+ if defaults.auth is not None:
204
+ interceptors += [
205
+ AuthenticationInterceptorUnaryUnary(options=defaults.auth), # type: ignore [list-item]
206
+ AuthenticationInterceptorUnaryStream(options=defaults.auth), # type: ignore [list-item]
207
+ ]
208
+
209
+ if defaults.sign is not None:
210
+ interceptors += [
211
+ SigningInterceptorUnaryUnary(options=defaults.sign), # type: ignore [list-item]
212
+ SigningInterceptorUnaryStream(options=defaults.sign), # type: ignore [list-item]
213
+ ]
214
+
180
215
  ssl = defaults.ssl.enabled if options.ssl is None else options.ssl
181
216
  if ssl:
182
217
  return secure_channel(
@@ -199,8 +234,9 @@ def parse_grpc_uri(
199
234
  ),
200
235
  ),
201
236
  channel_options,
237
+ interceptors=interceptors,
202
238
  )
203
- return insecure_channel(target, channel_options)
239
+ return insecure_channel(target, channel_options, interceptors=interceptors)
204
240
 
205
241
 
206
242
  def _to_bool(value: str) -> bool:
@@ -252,13 +288,13 @@ def _parse_query_params(uri: str, query_string: str) -> _QueryParams:
252
288
  }
253
289
 
254
290
  if ssl is False:
255
- erros = []
291
+ errors = []
256
292
  for opt_name, opt in ssl_opts.items():
257
293
  if opt is not None:
258
- erros.append(opt_name)
259
- if erros:
294
+ errors.append(opt_name)
295
+ if errors:
260
296
  raise ValueError(
261
- f"Option(s) {', '.join(erros)} found in URI {uri!r}, but SSL is disabled",
297
+ f"Option(s) {', '.join(errors)} found in URI {uri!r}, but SSL is disabled",
262
298
  )
263
299
 
264
300
  keep_alive_option = options.pop("keep_alive", None)
@@ -272,13 +308,13 @@ def _parse_query_params(uri: str, query_string: str) -> _QueryParams:
272
308
  }
273
309
 
274
310
  if keep_alive is False:
275
- erros = []
311
+ errors = []
276
312
  for opt_name, opt in keep_alive_opts.items():
277
313
  if opt is not None:
278
- erros.append(opt_name)
279
- if erros:
314
+ errors.append(opt_name)
315
+ if errors:
280
316
  raise ValueError(
281
- f"Option(s) {', '.join(erros)} found in URI {uri!r}, but keep_alive is disabled",
317
+ f"Option(s) {', '.join(errors)} found in URI {uri!r}, but keep_alive is disabled",
282
318
  )
283
319
 
284
320
  if options:
@@ -8,7 +8,10 @@ import inspect
8
8
  from collections.abc import Awaitable, Callable
9
9
  from typing import Any, Generic, Self, TypeVar, overload
10
10
 
11
- from grpc.aio import AioRpcError, Channel
11
+ from grpc.aio import (
12
+ AioRpcError,
13
+ Channel,
14
+ )
12
15
 
13
16
  from .channel import ChannelOptions, parse_grpc_uri
14
17
  from .exception import ApiClientError, ClientNotConnected
@@ -0,0 +1,158 @@
1
+ # License: MIT
2
+ # Copyright © 2025 Frequenz Energy-as-a-Service GmbH
3
+
4
+ """An Interceptor that adds HMAC signature of the metadata fields to a gRPC call."""
5
+
6
+ import dataclasses
7
+ import hmac
8
+ import logging
9
+ import secrets
10
+ import time
11
+ from base64 import urlsafe_b64encode
12
+ from typing import Any, AsyncIterable, Callable
13
+
14
+ from grpc.aio import (
15
+ ClientCallDetails,
16
+ UnaryStreamCall,
17
+ UnaryStreamClientInterceptor,
18
+ UnaryUnaryCall,
19
+ UnaryUnaryClientInterceptor,
20
+ )
21
+
22
+ _logger = logging.getLogger(__name__)
23
+
24
+
25
+ def _add_hmac(
26
+ secret: bytes, client_call_details: ClientCallDetails, ts: int, nonce: bytes
27
+ ) -> None:
28
+ """Add the HMAC authentication to the metadata fields of the call details.
29
+
30
+ The extra headers are directly added to the client_call details.
31
+
32
+ Args:
33
+ secret: The symmetric secret shared with the service.
34
+ client_call_details: The call details.
35
+ ts: The timestamp to use for the HMAC.
36
+ nonce: The nonce to use for the HMAC.
37
+ """
38
+ if client_call_details.metadata is None:
39
+ _logger.error(
40
+ "No metadata found, cannot extract an api key. Therefore, cannot sign the request."
41
+ )
42
+ return
43
+
44
+ key: Any = client_call_details.metadata.get("key")
45
+ if key is None:
46
+ _logger.error("No key found in metadata, cannot sign the request.")
47
+ return
48
+
49
+ # Make into a base10 integer string and then encode to bytes
50
+ # We can not use a raw bytes timestamp as the underlying network library
51
+ # really hates zero bytes in the metadata values
52
+ ts_bytes = str(ts).encode()
53
+ nonce_bytes = urlsafe_b64encode(nonce)
54
+
55
+ hmac_obj = hmac.new(secret, digestmod="sha256")
56
+ hmac_obj.update(key.encode())
57
+ hmac_obj.update(ts_bytes)
58
+ hmac_obj.update(nonce_bytes)
59
+
60
+ # Once again, gRPC is mistyped
61
+ hmac_obj.update(client_call_details.method.split(b"/")[-1]) # type: ignore[arg-type]
62
+
63
+ client_call_details.metadata["ts"] = ts_bytes
64
+ client_call_details.metadata["nonce"] = nonce_bytes
65
+ # By definition the signature is base64 encoded _without_ the padding, so we strip that
66
+ client_call_details.metadata["sig"] = urlsafe_b64encode(hmac_obj.digest()).strip(
67
+ b"="
68
+ )
69
+
70
+
71
+ @dataclasses.dataclass(frozen=True)
72
+ class SigningOptions:
73
+ """Options for message signing of messages."""
74
+
75
+ secret: str
76
+ """The secret to sign the message with."""
77
+
78
+
79
+ # There is an issue in gRPC which means the type can not be specified correctly here.
80
+ class SigningInterceptorUnaryUnary(UnaryUnaryClientInterceptor): # type: ignore[type-arg]
81
+ """An Interceptor that adds HMAC authentication of the metadata fields to a gRPC call."""
82
+
83
+ def __init__(self, options: SigningOptions):
84
+ """Create an instance of the interceptor.
85
+
86
+ Args:
87
+ options: The options for signing the message.
88
+ """
89
+ self._secret = options.secret.encode()
90
+
91
+ async def intercept_unary_unary(
92
+ self,
93
+ continuation: Callable[
94
+ [ClientCallDetails, object], UnaryUnaryCall[object, object]
95
+ ],
96
+ client_call_details: ClientCallDetails,
97
+ request: object,
98
+ ) -> object:
99
+ """Intercept the call to add HMAC authentication to the metadata fields.
100
+
101
+ This is a known method from the base class that is overridden.
102
+
103
+ Args:
104
+ continuation: The next interceptor in the chain.
105
+ client_call_details: The call details.
106
+ request: The request object.
107
+
108
+ Returns:
109
+ The response object (this implementation does not modify the response).
110
+ """
111
+ _add_hmac(
112
+ self._secret,
113
+ client_call_details,
114
+ int(time.time()),
115
+ secrets.token_bytes(16),
116
+ )
117
+ return await continuation(client_call_details, request)
118
+
119
+
120
+ # There is an issue in gRPC which means the type can not be specified correctly here.
121
+ class SigningInterceptorUnaryStream(UnaryStreamClientInterceptor): # type: ignore[type-arg]
122
+ """An Interceptor that adds HMAC authentication of the metadata fields to a gRPC call."""
123
+
124
+ def __init__(self, options: SigningOptions):
125
+ """Create an instance of the interceptor.
126
+
127
+ Args:
128
+ options: The options for signing the message.
129
+ """
130
+ self._secret = options.secret.encode()
131
+
132
+ async def intercept_unary_stream(
133
+ self,
134
+ continuation: Callable[
135
+ [ClientCallDetails, Any], UnaryStreamCall[object, object]
136
+ ],
137
+ client_call_details: ClientCallDetails,
138
+ request: Any,
139
+ ) -> AsyncIterable[object] | UnaryStreamCall[object, object]:
140
+ """Intercept the call to add HMAC authentication to the metadata fields.
141
+
142
+ This is a known method from the base class that is overridden.
143
+
144
+ Args:
145
+ continuation: The next interceptor in the chain.
146
+ client_call_details: The call details.
147
+ request: The request object.
148
+
149
+ Returns:
150
+ The response object (this implementation does not modify the response).
151
+ """
152
+ _add_hmac(
153
+ self._secret,
154
+ client_call_details,
155
+ int(time.time()),
156
+ secrets.token_bytes(16),
157
+ )
158
+ return await continuation(client_call_details, request) # type: ignore
@@ -60,16 +60,22 @@ class GrpcStreamBroadcaster(Generic[InputT, OutputT]):
60
60
  )
61
61
  self._task = asyncio.create_task(self._run())
62
62
 
63
- def new_receiver(self, maxsize: int = 50) -> channels.Receiver[OutputT]:
63
+ def new_receiver(
64
+ self, maxsize: int = 50, warn_on_overflow: bool = True
65
+ ) -> channels.Receiver[OutputT]:
64
66
  """Create a new receiver for the stream.
65
67
 
66
68
  Args:
67
69
  maxsize: The maximum number of messages to buffer.
70
+ warn_on_overflow: Whether to log a warning when the receiver's
71
+ buffer is full and a message is dropped.
68
72
 
69
73
  Returns:
70
74
  A new receiver.
71
75
  """
72
- return self._channel.new_receiver(limit=maxsize)
76
+ return self._channel.new_receiver(
77
+ limit=maxsize, warn_on_overflow=warn_on_overflow
78
+ )
73
79
 
74
80
  @property
75
81
  def is_running(self) -> bool:
@@ -82,6 +88,7 @@ class GrpcStreamBroadcaster(Generic[InputT, OutputT]):
82
88
 
83
89
  async def stop(self) -> None:
84
90
  """Stop the streaming helper."""
91
+ _logger.info("%s: stopping the stream", self._stream_name)
85
92
  if self._task.done():
86
93
  return
87
94
  self._task.cancel()
@@ -104,6 +111,12 @@ class GrpcStreamBroadcaster(Generic[InputT, OutputT]):
104
111
  await sender.send(self._transform(msg))
105
112
  except grpc.aio.AioRpcError as err:
106
113
  error = err
114
+ except Exception as err: # pylint: disable=broad-except
115
+ _logger.exception(
116
+ "%s: raise an unexpected exception",
117
+ self._stream_name,
118
+ )
119
+ error = err
107
120
  if error is None and not self._retry_on_exhausted_stream:
108
121
  _logger.info(
109
122
  "%s: connection closed, stream exhausted", self._stream_name
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: frequenz-client-base
3
+ Version: 0.10.0
4
+ Summary: Utilities for writing Frequenz API clients
5
+ Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
6
+ License: MIT
7
+ Project-URL: Documentation, https://frequenz-floss.github.io/frequenz-client-base-python/
8
+ Project-URL: Changelog, https://github.com/frequenz-floss/frequenz-client-base-python/releases
9
+ Project-URL: Issues, https://github.com/frequenz-floss/frequenz-client-base-python/issues
10
+ Project-URL: Repository, https://github.com/frequenz-floss/frequenz-client-base-python
11
+ Project-URL: Support, https://github.com/frequenz-floss/frequenz-client-base-python/discussions/categories/support
12
+ Keywords: frequenz,python,lib,library,client-base
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Topic :: Software Development :: Libraries
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: <4,>=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: frequenz-channels<2,>=1.6.1
24
+ Requires-Dist: grpcio<2,>=1.59
25
+ Requires-Dist: protobuf<7,>=5.29.2
26
+ Requires-Dist: typing-extensions<5,>=4.6.0
27
+ Provides-Extra: dev-flake8
28
+ Requires-Dist: flake8==7.2.0; extra == "dev-flake8"
29
+ Requires-Dist: flake8-docstrings==1.7.0; extra == "dev-flake8"
30
+ Requires-Dist: flake8-pyproject==1.2.3; extra == "dev-flake8"
31
+ Requires-Dist: pydoclint==0.6.6; extra == "dev-flake8"
32
+ Requires-Dist: pydocstyle==6.3.0; extra == "dev-flake8"
33
+ Requires-Dist: frequenz-client-base; extra == "dev-flake8"
34
+ Provides-Extra: dev-formatting
35
+ Requires-Dist: black==25.1.0; extra == "dev-formatting"
36
+ Requires-Dist: isort==6.0.1; extra == "dev-formatting"
37
+ Provides-Extra: dev-mkdocs
38
+ Requires-Dist: black==25.1.0; extra == "dev-mkdocs"
39
+ Requires-Dist: Markdown==3.8; extra == "dev-mkdocs"
40
+ Requires-Dist: mike==2.1.3; extra == "dev-mkdocs"
41
+ Requires-Dist: mkdocs-gen-files==0.5.0; extra == "dev-mkdocs"
42
+ Requires-Dist: mkdocs-literate-nav==0.6.2; extra == "dev-mkdocs"
43
+ Requires-Dist: mkdocs-macros-plugin==1.3.7; extra == "dev-mkdocs"
44
+ Requires-Dist: mkdocs-material==9.6.12; extra == "dev-mkdocs"
45
+ Requires-Dist: mkdocstrings[python]==0.29.1; extra == "dev-mkdocs"
46
+ Requires-Dist: mkdocstrings-python==1.16.10; extra == "dev-mkdocs"
47
+ Requires-Dist: frequenz-repo-config[lib]==0.13.3; extra == "dev-mkdocs"
48
+ Requires-Dist: frequenz-client-base; extra == "dev-mkdocs"
49
+ Provides-Extra: dev-mypy
50
+ Requires-Dist: mypy==1.15.0; extra == "dev-mypy"
51
+ Requires-Dist: types-Markdown==3.8.0.20250415; extra == "dev-mypy"
52
+ Requires-Dist: types-protobuf==5.29.1.20250403; extra == "dev-mypy"
53
+ Requires-Dist: grpc-stubs==1.53.0.6; extra == "dev-mypy"
54
+ Requires-Dist: frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-mypy"
55
+ Provides-Extra: dev-noxfile
56
+ Requires-Dist: nox==2025.5.1; extra == "dev-noxfile"
57
+ Requires-Dist: frequenz-repo-config[lib]==0.13.3; extra == "dev-noxfile"
58
+ Provides-Extra: dev-pylint
59
+ Requires-Dist: pylint==3.3.6; extra == "dev-pylint"
60
+ Requires-Dist: frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]; extra == "dev-pylint"
61
+ Provides-Extra: dev-pytest
62
+ Requires-Dist: pytest==8.3.5; extra == "dev-pytest"
63
+ Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.13.3; extra == "dev-pytest"
64
+ Requires-Dist: pytest-mock==3.14.0; extra == "dev-pytest"
65
+ Requires-Dist: pytest-asyncio==0.26.0; extra == "dev-pytest"
66
+ Requires-Dist: async-solipsism==0.7; extra == "dev-pytest"
67
+ Requires-Dist: hypothesis==6.131.9; extra == "dev-pytest"
68
+ Requires-Dist: frequenz-client-base; extra == "dev-pytest"
69
+ Provides-Extra: dev
70
+ Requires-Dist: frequenz-client-base[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]; extra == "dev"
71
+ Dynamic: license-file
72
+
73
+ # Frequenz Client Base Library
74
+
75
+ [![Build Status](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml/badge.svg)](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml)
76
+ [![PyPI Package](https://img.shields.io/pypi/v/frequenz-client-base)](https://pypi.org/project/frequenz-client-base/)
77
+ [![Docs](https://img.shields.io/badge/docs-latest-informational)](https://frequenz-floss.github.io/frequenz-client-base-python/)
78
+
79
+ ## Introduction
80
+
81
+ Utilities for writing Frequenz API clients
82
+
83
+ ## Supported Platforms
84
+
85
+ The following platforms are officially supported (tested):
86
+
87
+ - **Python:** 3.11
88
+ - **Operating System:** Ubuntu Linux 20.04
89
+ - **Architectures:** amd64, arm64
90
+
91
+ ## Contributing
92
+
93
+ If you want to know how to build this project and contribute to it, please
94
+ check out the [Contributing Guide](CONTRIBUTING.md).
@@ -4,6 +4,7 @@ README.md
4
4
  RELEASE_NOTES.md
5
5
  pyproject.toml
6
6
  src/frequenz/client/base/__init__.py
7
+ src/frequenz/client/base/authentication.py
7
8
  src/frequenz/client/base/channel.py
8
9
  src/frequenz/client/base/client.py
9
10
  src/frequenz/client/base/conftest.py
@@ -11,6 +12,7 @@ src/frequenz/client/base/conversion.py
11
12
  src/frequenz/client/base/exception.py
12
13
  src/frequenz/client/base/py.typed
13
14
  src/frequenz/client/base/retry.py
15
+ src/frequenz/client/base/signing.py
14
16
  src/frequenz/client/base/streaming.py
15
17
  src/frequenz_client_base.egg-info/PKG-INFO
16
18
  src/frequenz_client_base.egg-info/SOURCES.txt
@@ -0,0 +1,56 @@
1
+ frequenz-channels<2,>=1.6.1
2
+ grpcio<2,>=1.59
3
+ protobuf<7,>=5.29.2
4
+ typing-extensions<5,>=4.6.0
5
+
6
+ [dev]
7
+ frequenz-client-base[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]
8
+
9
+ [dev-flake8]
10
+ flake8==7.2.0
11
+ flake8-docstrings==1.7.0
12
+ flake8-pyproject==1.2.3
13
+ pydoclint==0.6.6
14
+ pydocstyle==6.3.0
15
+ frequenz-client-base
16
+
17
+ [dev-formatting]
18
+ black==25.1.0
19
+ isort==6.0.1
20
+
21
+ [dev-mkdocs]
22
+ black==25.1.0
23
+ Markdown==3.8
24
+ mike==2.1.3
25
+ mkdocs-gen-files==0.5.0
26
+ mkdocs-literate-nav==0.6.2
27
+ mkdocs-macros-plugin==1.3.7
28
+ mkdocs-material==9.6.12
29
+ mkdocstrings[python]==0.29.1
30
+ mkdocstrings-python==1.16.10
31
+ frequenz-repo-config[lib]==0.13.3
32
+ frequenz-client-base
33
+
34
+ [dev-mypy]
35
+ mypy==1.15.0
36
+ types-Markdown==3.8.0.20250415
37
+ types-protobuf==5.29.1.20250403
38
+ grpc-stubs==1.53.0.6
39
+ frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]
40
+
41
+ [dev-noxfile]
42
+ nox==2025.5.1
43
+ frequenz-repo-config[lib]==0.13.3
44
+
45
+ [dev-pylint]
46
+ pylint==3.3.6
47
+ frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]
48
+
49
+ [dev-pytest]
50
+ pytest==8.3.5
51
+ frequenz-repo-config[extra-lint-examples]==0.13.3
52
+ pytest-mock==3.14.0
53
+ pytest-asyncio==0.26.0
54
+ async-solipsism==0.7
55
+ hypothesis==6.131.9
56
+ frequenz-client-base
@@ -1,53 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: frequenz-client-base
3
- Version: 0.8.1
4
- Summary: Utilities for writing Frequenz API clients
5
- Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
6
- License: MIT
7
- Project-URL: Documentation, https://frequenz-floss.github.io/frequenz-client-base-python/
8
- Project-URL: Changelog, https://github.com/frequenz-floss/frequenz-client-base-python/releases
9
- Project-URL: Issues, https://github.com/frequenz-floss/frequenz-client-base-python/issues
10
- Project-URL: Repository, https://github.com/frequenz-floss/frequenz-client-base-python
11
- Project-URL: Support, https://github.com/frequenz-floss/frequenz-client-base-python/discussions/categories/support
12
- Keywords: frequenz,python,lib,library,client-base
13
- Classifier: Development Status :: 3 - Alpha
14
- Classifier: Intended Audience :: Developers
15
- Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3 :: Only
18
- Classifier: Topic :: Software Development :: Libraries
19
- Classifier: Typing :: Typed
20
- Requires-Python: <4,>=3.11
21
- Description-Content-Type: text/markdown
22
- Provides-Extra: dev-flake8
23
- Provides-Extra: dev-formatting
24
- Provides-Extra: dev-mkdocs
25
- Provides-Extra: dev-mypy
26
- Provides-Extra: dev-noxfile
27
- Provides-Extra: dev-pylint
28
- Provides-Extra: dev-pytest
29
- Provides-Extra: dev
30
- License-File: LICENSE
31
-
32
- # Frequenz Client Base Library
33
-
34
- [![Build Status](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml/badge.svg)](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml)
35
- [![PyPI Package](https://img.shields.io/pypi/v/frequenz-client-base)](https://pypi.org/project/frequenz-client-base/)
36
- [![Docs](https://img.shields.io/badge/docs-latest-informational)](https://frequenz-floss.github.io/frequenz-client-base-python/)
37
-
38
- ## Introduction
39
-
40
- Utilities for writing Frequenz API clients
41
-
42
- ## Supported Platforms
43
-
44
- The following platforms are officially supported (tested):
45
-
46
- - **Python:** 3.11
47
- - **Operating System:** Ubuntu Linux 20.04
48
- - **Architectures:** amd64, arm64
49
-
50
- ## Contributing
51
-
52
- If you want to know how to build this project and contribute to it, please
53
- check out the [Contributing Guide](CONTRIBUTING.md).
@@ -1,17 +0,0 @@
1
- # Frequenz Client Base Library Release Notes
2
-
3
- ## Summary
4
-
5
- <!-- Here goes a general summary of what this release is about -->
6
-
7
- ## Upgrading
8
-
9
- <!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
10
-
11
- ## New Features
12
-
13
- <!-- Here goes the main new features and examples or instructions on how to use them -->
14
-
15
- ## Bug Fixes
16
-
17
- <!-- Here goes notable bug fixes that are worth a special mention or explanation -->
@@ -1,53 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: frequenz-client-base
3
- Version: 0.8.1
4
- Summary: Utilities for writing Frequenz API clients
5
- Author-email: Frequenz Energy-as-a-Service GmbH <floss@frequenz.com>
6
- License: MIT
7
- Project-URL: Documentation, https://frequenz-floss.github.io/frequenz-client-base-python/
8
- Project-URL: Changelog, https://github.com/frequenz-floss/frequenz-client-base-python/releases
9
- Project-URL: Issues, https://github.com/frequenz-floss/frequenz-client-base-python/issues
10
- Project-URL: Repository, https://github.com/frequenz-floss/frequenz-client-base-python
11
- Project-URL: Support, https://github.com/frequenz-floss/frequenz-client-base-python/discussions/categories/support
12
- Keywords: frequenz,python,lib,library,client-base
13
- Classifier: Development Status :: 3 - Alpha
14
- Classifier: Intended Audience :: Developers
15
- Classifier: License :: OSI Approved :: MIT License
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3 :: Only
18
- Classifier: Topic :: Software Development :: Libraries
19
- Classifier: Typing :: Typed
20
- Requires-Python: <4,>=3.11
21
- Description-Content-Type: text/markdown
22
- Provides-Extra: dev-flake8
23
- Provides-Extra: dev-formatting
24
- Provides-Extra: dev-mkdocs
25
- Provides-Extra: dev-mypy
26
- Provides-Extra: dev-noxfile
27
- Provides-Extra: dev-pylint
28
- Provides-Extra: dev-pytest
29
- Provides-Extra: dev
30
- License-File: LICENSE
31
-
32
- # Frequenz Client Base Library
33
-
34
- [![Build Status](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml/badge.svg)](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml)
35
- [![PyPI Package](https://img.shields.io/pypi/v/frequenz-client-base)](https://pypi.org/project/frequenz-client-base/)
36
- [![Docs](https://img.shields.io/badge/docs-latest-informational)](https://frequenz-floss.github.io/frequenz-client-base-python/)
37
-
38
- ## Introduction
39
-
40
- Utilities for writing Frequenz API clients
41
-
42
- ## Supported Platforms
43
-
44
- The following platforms are officially supported (tested):
45
-
46
- - **Python:** 3.11
47
- - **Operating System:** Ubuntu Linux 20.04
48
- - **Architectures:** amd64, arm64
49
-
50
- ## Contributing
51
-
52
- If you want to know how to build this project and contribute to it, please
53
- check out the [Contributing Guide](CONTRIBUTING.md).
@@ -1,56 +0,0 @@
1
- frequenz-channels<2,>=v1.0.0-rc1
2
- grpcio<2,>=1.54.2
3
- protobuf<6,>=4.21.6
4
- typing-extensions<5,>=4.5.0
5
-
6
- [dev]
7
- frequenz-client-base[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]
8
-
9
- [dev-flake8]
10
- flake8==7.1.1
11
- flake8-docstrings==1.7.0
12
- flake8-pyproject==1.2.3
13
- pydoclint==0.5.9
14
- pydocstyle==6.3.0
15
- frequenz-client-base
16
-
17
- [dev-formatting]
18
- black==24.10.0
19
- isort==5.13.2
20
-
21
- [dev-mkdocs]
22
- black==24.10.0
23
- Markdown==3.7
24
- mike==2.1.3
25
- mkdocs-gen-files==0.5.0
26
- mkdocs-literate-nav==0.6.1
27
- mkdocs-macros-plugin==1.3.7
28
- mkdocs-material==9.5.43
29
- mkdocstrings[python]==0.26.2
30
- mkdocstrings-python==1.12.2
31
- frequenz-repo-config[lib]==0.10.0
32
- frequenz-client-base
33
-
34
- [dev-mypy]
35
- mypy==1.13.0
36
- types-Markdown==3.7.0.20240822
37
- types-protobuf==5.28.3.20241030
38
- grpc-stubs==1.53.0.5
39
- frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]
40
-
41
- [dev-noxfile]
42
- nox==2024.10.9
43
- frequenz-repo-config[lib]==0.10.0
44
-
45
- [dev-pylint]
46
- pylint==3.3.1
47
- frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]
48
-
49
- [dev-pytest]
50
- pytest==8.3.3
51
- frequenz-repo-config[extra-lint-examples]==0.10.0
52
- pytest-mock==3.14.0
53
- pytest-asyncio==0.24.0
54
- async-solipsism==0.7
55
- hypothesis==6.116.0
56
- frequenz-client-base