frequenz-client-base 0.8.0__tar.gz → 0.9.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.
- frequenz_client_base-0.9.0/PKG-INFO +93 -0
- frequenz_client_base-0.9.0/RELEASE_NOTES.md +6 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/pyproject.toml +25 -20
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/channel.py +5 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/streaming.py +8 -2
- frequenz_client_base-0.9.0/src/frequenz_client_base.egg-info/PKG-INFO +93 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz_client_base.egg-info/requires.txt +18 -18
- frequenz-client-base-0.8.0/PKG-INFO +0 -53
- frequenz-client-base-0.8.0/RELEASE_NOTES.md +0 -60
- frequenz-client-base-0.8.0/src/frequenz_client_base.egg-info/PKG-INFO +0 -53
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/LICENSE +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/MANIFEST.in +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/README.md +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/setup.cfg +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/__init__.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/client.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/conftest.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/conversion.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/exception.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/py.typed +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/retry.py +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz_client_base.egg-info/SOURCES.txt +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz_client_base.egg-info/dependency_links.txt +0 -0
- {frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz_client_base.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: frequenz-client-base
|
|
3
|
+
Version: 0.9.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.54.2
|
|
25
|
+
Requires-Dist: protobuf<6,>=4.21.6
|
|
26
|
+
Requires-Dist: typing-extensions<5,>=4.5.0
|
|
27
|
+
Provides-Extra: dev-flake8
|
|
28
|
+
Requires-Dist: flake8==7.1.1; 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.0; 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.0; extra == "dev-formatting"
|
|
37
|
+
Provides-Extra: dev-mkdocs
|
|
38
|
+
Requires-Dist: black==25.1.0; extra == "dev-mkdocs"
|
|
39
|
+
Requires-Dist: Markdown==3.7; 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.1; extra == "dev-mkdocs"
|
|
43
|
+
Requires-Dist: mkdocs-macros-plugin==1.3.7; extra == "dev-mkdocs"
|
|
44
|
+
Requires-Dist: mkdocs-material==9.6.1; extra == "dev-mkdocs"
|
|
45
|
+
Requires-Dist: mkdocstrings[python]==0.27.0; extra == "dev-mkdocs"
|
|
46
|
+
Requires-Dist: mkdocstrings-python==1.13.0; extra == "dev-mkdocs"
|
|
47
|
+
Requires-Dist: frequenz-repo-config[lib]==0.11.0; extra == "dev-mkdocs"
|
|
48
|
+
Requires-Dist: frequenz-client-base; extra == "dev-mkdocs"
|
|
49
|
+
Provides-Extra: dev-mypy
|
|
50
|
+
Requires-Dist: mypy==1.14.1; extra == "dev-mypy"
|
|
51
|
+
Requires-Dist: types-Markdown==3.7.0.20241204; extra == "dev-mypy"
|
|
52
|
+
Requires-Dist: types-protobuf==5.29.1.20241207; extra == "dev-mypy"
|
|
53
|
+
Requires-Dist: grpc-stubs==1.53.0.5; 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==2024.10.9; extra == "dev-noxfile"
|
|
57
|
+
Requires-Dist: frequenz-repo-config[lib]==0.11.0; extra == "dev-noxfile"
|
|
58
|
+
Provides-Extra: dev-pylint
|
|
59
|
+
Requires-Dist: pylint==3.3.4; 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.4; extra == "dev-pytest"
|
|
63
|
+
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.11.0; extra == "dev-pytest"
|
|
64
|
+
Requires-Dist: pytest-mock==3.14.0; extra == "dev-pytest"
|
|
65
|
+
Requires-Dist: pytest-asyncio==0.25.3; extra == "dev-pytest"
|
|
66
|
+
Requires-Dist: async-solipsism==0.7; extra == "dev-pytest"
|
|
67
|
+
Requires-Dist: hypothesis==6.124.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
|
+
|
|
72
|
+
# Frequenz Client Base Library
|
|
73
|
+
|
|
74
|
+
[](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml)
|
|
75
|
+
[](https://pypi.org/project/frequenz-client-base/)
|
|
76
|
+
[](https://frequenz-floss.github.io/frequenz-client-base-python/)
|
|
77
|
+
|
|
78
|
+
## Introduction
|
|
79
|
+
|
|
80
|
+
Utilities for writing Frequenz API clients
|
|
81
|
+
|
|
82
|
+
## Supported Platforms
|
|
83
|
+
|
|
84
|
+
The following platforms are officially supported (tested):
|
|
85
|
+
|
|
86
|
+
- **Python:** 3.11
|
|
87
|
+
- **Operating System:** Ubuntu Linux 20.04
|
|
88
|
+
- **Architectures:** amd64, arm64
|
|
89
|
+
|
|
90
|
+
## Contributing
|
|
91
|
+
|
|
92
|
+
If you want to know how to build this project and contribute to it, please
|
|
93
|
+
check out the [Contributing Guide](CONTRIBUTING.md).
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
[build-system]
|
|
5
5
|
requires = [
|
|
6
|
-
"setuptools ==
|
|
7
|
-
"setuptools_scm[toml] ==
|
|
8
|
-
"frequenz-repo-config[lib] == 0.
|
|
6
|
+
"setuptools == 75.8.0",
|
|
7
|
+
"setuptools_scm[toml] == 8.1.0",
|
|
8
|
+
"frequenz-repo-config[lib] == 0.11.0",
|
|
9
9
|
]
|
|
10
10
|
build-backend = "setuptools.build_meta"
|
|
11
11
|
|
|
@@ -26,7 +26,7 @@ classifiers = [
|
|
|
26
26
|
]
|
|
27
27
|
requires-python = ">= 3.11, < 4"
|
|
28
28
|
dependencies = [
|
|
29
|
-
"frequenz-channels >=
|
|
29
|
+
"frequenz-channels >= 1.6.1, < 2",
|
|
30
30
|
"grpcio >= 1.54.2, < 2",
|
|
31
31
|
"protobuf >= 4.21.6, < 6",
|
|
32
32
|
"typing-extensions >= 4.5.0, < 5",
|
|
@@ -42,45 +42,45 @@ dev-flake8 = [
|
|
|
42
42
|
"flake8 == 7.1.1",
|
|
43
43
|
"flake8-docstrings == 1.7.0",
|
|
44
44
|
"flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
|
|
45
|
-
"pydoclint == 0.
|
|
45
|
+
"pydoclint == 0.6.0",
|
|
46
46
|
"pydocstyle == 6.3.0",
|
|
47
47
|
"frequenz-client-base",
|
|
48
48
|
]
|
|
49
|
-
dev-formatting = ["black ==
|
|
49
|
+
dev-formatting = ["black == 25.1.0", "isort == 6.0.0"]
|
|
50
50
|
dev-mkdocs = [
|
|
51
|
-
"black ==
|
|
51
|
+
"black == 25.1.0",
|
|
52
52
|
"Markdown==3.7",
|
|
53
53
|
"mike == 2.1.3",
|
|
54
54
|
"mkdocs-gen-files == 0.5.0",
|
|
55
55
|
"mkdocs-literate-nav == 0.6.1",
|
|
56
56
|
"mkdocs-macros-plugin == 1.3.7",
|
|
57
|
-
"mkdocs-material == 9.
|
|
58
|
-
"mkdocstrings[python] == 0.
|
|
59
|
-
"mkdocstrings-python == 1.
|
|
60
|
-
"frequenz-repo-config[lib] == 0.
|
|
57
|
+
"mkdocs-material == 9.6.1",
|
|
58
|
+
"mkdocstrings[python] == 0.27.0",
|
|
59
|
+
"mkdocstrings-python == 1.13.0",
|
|
60
|
+
"frequenz-repo-config[lib] == 0.11.0",
|
|
61
61
|
"frequenz-client-base",
|
|
62
62
|
]
|
|
63
63
|
dev-mypy = [
|
|
64
|
-
"mypy == 1.
|
|
65
|
-
"types-Markdown == 3.7.0.
|
|
66
|
-
"types-protobuf == 5.
|
|
64
|
+
"mypy == 1.14.1",
|
|
65
|
+
"types-Markdown == 3.7.0.20241204",
|
|
66
|
+
"types-protobuf == 5.29.1.20241207",
|
|
67
67
|
"grpc-stubs == 1.53.0.5", # 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.
|
|
71
|
+
dev-noxfile = ["nox == 2024.10.9", "frequenz-repo-config[lib] == 0.11.0"]
|
|
72
72
|
dev-pylint = [
|
|
73
|
-
"pylint == 3.3.
|
|
73
|
+
"pylint == 3.3.4",
|
|
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.
|
|
79
|
-
"frequenz-repo-config[extra-lint-examples] == 0.
|
|
78
|
+
"pytest == 8.3.4",
|
|
79
|
+
"frequenz-repo-config[extra-lint-examples] == 0.11.0",
|
|
80
80
|
"pytest-mock == 3.14.0",
|
|
81
|
-
"pytest-asyncio == 0.
|
|
81
|
+
"pytest-asyncio == 0.25.3",
|
|
82
82
|
"async-solipsism == 0.7",
|
|
83
|
-
"hypothesis == 6.
|
|
83
|
+
"hypothesis == 6.124.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,14 @@ 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]
|
|
154
158
|
testpaths = ["tests", "src"]
|
|
155
159
|
asyncio_mode = "auto"
|
|
160
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
156
161
|
required_plugins = ["pytest-asyncio", "pytest-mock"]
|
|
157
162
|
|
|
158
163
|
[tool.mypy]
|
{frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/channel.py
RENAMED
|
@@ -101,6 +101,11 @@ def parse_grpc_uri(
|
|
|
101
101
|
enabled. Will raise a `ValueError` if the file cannot be read.
|
|
102
102
|
- `ssl_certificate_chain_path` (str): Path to the certificate chain file. Only
|
|
103
103
|
valid if SSL is enabled. Will raise a `ValueError` if the file cannot be read.
|
|
104
|
+
- `keep_alive` (bool): Enable or disable HTTP2 keep-alive. Defaults to `True`.
|
|
105
|
+
- `keep_alive_interval_s` (float): The interval between HTTP2 pings in seconds.
|
|
106
|
+
Defaults to 60.
|
|
107
|
+
- `keep_alive_timeout_s` (float): The time to wait for a HTTP2 keep-alive response
|
|
108
|
+
in seconds
|
|
104
109
|
|
|
105
110
|
Args:
|
|
106
111
|
uri: The gRPC URI specifying the connection parameters.
|
{frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/streaming.py
RENAMED
|
@@ -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(
|
|
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(
|
|
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:
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: frequenz-client-base
|
|
3
|
+
Version: 0.9.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.54.2
|
|
25
|
+
Requires-Dist: protobuf<6,>=4.21.6
|
|
26
|
+
Requires-Dist: typing-extensions<5,>=4.5.0
|
|
27
|
+
Provides-Extra: dev-flake8
|
|
28
|
+
Requires-Dist: flake8==7.1.1; 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.0; 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.0; extra == "dev-formatting"
|
|
37
|
+
Provides-Extra: dev-mkdocs
|
|
38
|
+
Requires-Dist: black==25.1.0; extra == "dev-mkdocs"
|
|
39
|
+
Requires-Dist: Markdown==3.7; 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.1; extra == "dev-mkdocs"
|
|
43
|
+
Requires-Dist: mkdocs-macros-plugin==1.3.7; extra == "dev-mkdocs"
|
|
44
|
+
Requires-Dist: mkdocs-material==9.6.1; extra == "dev-mkdocs"
|
|
45
|
+
Requires-Dist: mkdocstrings[python]==0.27.0; extra == "dev-mkdocs"
|
|
46
|
+
Requires-Dist: mkdocstrings-python==1.13.0; extra == "dev-mkdocs"
|
|
47
|
+
Requires-Dist: frequenz-repo-config[lib]==0.11.0; extra == "dev-mkdocs"
|
|
48
|
+
Requires-Dist: frequenz-client-base; extra == "dev-mkdocs"
|
|
49
|
+
Provides-Extra: dev-mypy
|
|
50
|
+
Requires-Dist: mypy==1.14.1; extra == "dev-mypy"
|
|
51
|
+
Requires-Dist: types-Markdown==3.7.0.20241204; extra == "dev-mypy"
|
|
52
|
+
Requires-Dist: types-protobuf==5.29.1.20241207; extra == "dev-mypy"
|
|
53
|
+
Requires-Dist: grpc-stubs==1.53.0.5; 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==2024.10.9; extra == "dev-noxfile"
|
|
57
|
+
Requires-Dist: frequenz-repo-config[lib]==0.11.0; extra == "dev-noxfile"
|
|
58
|
+
Provides-Extra: dev-pylint
|
|
59
|
+
Requires-Dist: pylint==3.3.4; 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.4; extra == "dev-pytest"
|
|
63
|
+
Requires-Dist: frequenz-repo-config[extra-lint-examples]==0.11.0; extra == "dev-pytest"
|
|
64
|
+
Requires-Dist: pytest-mock==3.14.0; extra == "dev-pytest"
|
|
65
|
+
Requires-Dist: pytest-asyncio==0.25.3; extra == "dev-pytest"
|
|
66
|
+
Requires-Dist: async-solipsism==0.7; extra == "dev-pytest"
|
|
67
|
+
Requires-Dist: hypothesis==6.124.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
|
+
|
|
72
|
+
# Frequenz Client Base Library
|
|
73
|
+
|
|
74
|
+
[](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml)
|
|
75
|
+
[](https://pypi.org/project/frequenz-client-base/)
|
|
76
|
+
[](https://frequenz-floss.github.io/frequenz-client-base-python/)
|
|
77
|
+
|
|
78
|
+
## Introduction
|
|
79
|
+
|
|
80
|
+
Utilities for writing Frequenz API clients
|
|
81
|
+
|
|
82
|
+
## Supported Platforms
|
|
83
|
+
|
|
84
|
+
The following platforms are officially supported (tested):
|
|
85
|
+
|
|
86
|
+
- **Python:** 3.11
|
|
87
|
+
- **Operating System:** Ubuntu Linux 20.04
|
|
88
|
+
- **Architectures:** amd64, arm64
|
|
89
|
+
|
|
90
|
+
## Contributing
|
|
91
|
+
|
|
92
|
+
If you want to know how to build this project and contribute to it, please
|
|
93
|
+
check out the [Contributing Guide](CONTRIBUTING.md).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
frequenz-channels<2,>=
|
|
1
|
+
frequenz-channels<2,>=1.6.1
|
|
2
2
|
grpcio<2,>=1.54.2
|
|
3
3
|
protobuf<6,>=4.21.6
|
|
4
4
|
typing-extensions<5,>=4.5.0
|
|
@@ -10,47 +10,47 @@ frequenz-client-base[dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,d
|
|
|
10
10
|
flake8==7.1.1
|
|
11
11
|
flake8-docstrings==1.7.0
|
|
12
12
|
flake8-pyproject==1.2.3
|
|
13
|
-
pydoclint==0.
|
|
13
|
+
pydoclint==0.6.0
|
|
14
14
|
pydocstyle==6.3.0
|
|
15
15
|
frequenz-client-base
|
|
16
16
|
|
|
17
17
|
[dev-formatting]
|
|
18
|
-
black==
|
|
19
|
-
isort==
|
|
18
|
+
black==25.1.0
|
|
19
|
+
isort==6.0.0
|
|
20
20
|
|
|
21
21
|
[dev-mkdocs]
|
|
22
|
-
black==
|
|
22
|
+
black==25.1.0
|
|
23
23
|
Markdown==3.7
|
|
24
24
|
mike==2.1.3
|
|
25
25
|
mkdocs-gen-files==0.5.0
|
|
26
26
|
mkdocs-literate-nav==0.6.1
|
|
27
27
|
mkdocs-macros-plugin==1.3.7
|
|
28
|
-
mkdocs-material==9.
|
|
29
|
-
mkdocstrings[python]==0.
|
|
30
|
-
mkdocstrings-python==1.
|
|
31
|
-
frequenz-repo-config[lib]==0.
|
|
28
|
+
mkdocs-material==9.6.1
|
|
29
|
+
mkdocstrings[python]==0.27.0
|
|
30
|
+
mkdocstrings-python==1.13.0
|
|
31
|
+
frequenz-repo-config[lib]==0.11.0
|
|
32
32
|
frequenz-client-base
|
|
33
33
|
|
|
34
34
|
[dev-mypy]
|
|
35
|
-
mypy==1.
|
|
36
|
-
types-Markdown==3.7.0.
|
|
37
|
-
types-protobuf==5.
|
|
35
|
+
mypy==1.14.1
|
|
36
|
+
types-Markdown==3.7.0.20241204
|
|
37
|
+
types-protobuf==5.29.1.20241207
|
|
38
38
|
grpc-stubs==1.53.0.5
|
|
39
39
|
frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]
|
|
40
40
|
|
|
41
41
|
[dev-noxfile]
|
|
42
42
|
nox==2024.10.9
|
|
43
|
-
frequenz-repo-config[lib]==0.
|
|
43
|
+
frequenz-repo-config[lib]==0.11.0
|
|
44
44
|
|
|
45
45
|
[dev-pylint]
|
|
46
|
-
pylint==3.3.
|
|
46
|
+
pylint==3.3.4
|
|
47
47
|
frequenz-client-base[dev-mkdocs,dev-noxfile,dev-pytest]
|
|
48
48
|
|
|
49
49
|
[dev-pytest]
|
|
50
|
-
pytest==8.3.
|
|
51
|
-
frequenz-repo-config[extra-lint-examples]==0.
|
|
50
|
+
pytest==8.3.4
|
|
51
|
+
frequenz-repo-config[extra-lint-examples]==0.11.0
|
|
52
52
|
pytest-mock==3.14.0
|
|
53
|
-
pytest-asyncio==0.
|
|
53
|
+
pytest-asyncio==0.25.3
|
|
54
54
|
async-solipsism==0.7
|
|
55
|
-
hypothesis==6.
|
|
55
|
+
hypothesis==6.124.9
|
|
56
56
|
frequenz-client-base
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: frequenz-client-base
|
|
3
|
-
Version: 0.8.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
|
-
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
|
-
[](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml)
|
|
35
|
-
[](https://pypi.org/project/frequenz-client-base/)
|
|
36
|
-
[](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,60 +0,0 @@
|
|
|
1
|
-
# Frequenz Client Base Library Release Notes
|
|
2
|
-
|
|
3
|
-
## Upgrading
|
|
4
|
-
|
|
5
|
-
The `BaseApiClient` class is generic again. There was too many issues with the new approach, so it was rolled back.
|
|
6
|
-
|
|
7
|
-
- If you are upgrading from v0.7.x, you should be able to roll back your changes with the upgrade and just keep the new `stub` property.
|
|
8
|
-
|
|
9
|
-
```python
|
|
10
|
-
# Old
|
|
11
|
-
from __future__ import annotations
|
|
12
|
-
import my_service_pb2_grpc
|
|
13
|
-
class MyApiClient(BaseApiClient):
|
|
14
|
-
def __init__(self, server_url: str, *, ...) -> None:
|
|
15
|
-
super().__init__(server_url, ...)
|
|
16
|
-
stub = my_service_pb2_grpc.MyServiceStub(self.channel)
|
|
17
|
-
self._stub: my_service_pb2_grpc.MyServiceAsyncStub = stub # type: ignore
|
|
18
|
-
...
|
|
19
|
-
|
|
20
|
-
@property
|
|
21
|
-
def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub:
|
|
22
|
-
if self.channel is None:
|
|
23
|
-
raise ClientNotConnected(server_url=self.server_url, operation="stub")
|
|
24
|
-
return self._stub
|
|
25
|
-
|
|
26
|
-
# New
|
|
27
|
-
from __future__ import annotations
|
|
28
|
-
import my_service_pb2_grpc
|
|
29
|
-
from my_service_pb2_grpc import MyServiceStub
|
|
30
|
-
class MyApiClient(BaseApiClient[MyServiceStub]):
|
|
31
|
-
def __init__(self, server_url: str, *, ...) -> None:
|
|
32
|
-
super().__init__(server_url, MyServiceStub, ...)
|
|
33
|
-
...
|
|
34
|
-
|
|
35
|
-
@property
|
|
36
|
-
def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub:
|
|
37
|
-
"""The gRPC stub for the API."""
|
|
38
|
-
if self.channel is None or self._stub is None:
|
|
39
|
-
raise ClientNotConnected(server_url=self.server_url, operation="stub")
|
|
40
|
-
# This type: ignore is needed because we need to cast the sync stub to
|
|
41
|
-
# the async stub, but we can't use cast because the async stub doesn't
|
|
42
|
-
# actually exists to the eyes of the interpreter, it only exists for the
|
|
43
|
-
# type-checker, so it can only be used for type hints.
|
|
44
|
-
return self._stub # type: ignore
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
- If you are upgrading from v0.6.x, you should only need to add the `stub` property to your client class and then use that property instead of `_stub` in your code.
|
|
48
|
-
|
|
49
|
-
```python
|
|
50
|
-
@property
|
|
51
|
-
def stub(self) -> my_service_pb2_grpc.MyServiceAsyncStub:
|
|
52
|
-
"""The gRPC stub for the API."""
|
|
53
|
-
if self.channel is None or self._stub is None:
|
|
54
|
-
raise ClientNotConnected(server_url=self.server_url, operation="stub")
|
|
55
|
-
# This type: ignore is needed because we need to cast the sync stub to
|
|
56
|
-
# the async stub, but we can't use cast because the async stub doesn't
|
|
57
|
-
# actually exists to the eyes of the interpreter, it only exists for the
|
|
58
|
-
# type-checker, so it can only be used for type hints.
|
|
59
|
-
return self._stub # type: ignore
|
|
60
|
-
```
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: frequenz-client-base
|
|
3
|
-
Version: 0.8.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
|
-
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
|
-
[](https://github.com/frequenz-floss/frequenz-client-base-python/actions/workflows/ci.yaml)
|
|
35
|
-
[](https://pypi.org/project/frequenz-client-base/)
|
|
36
|
-
[](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).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/__init__.py
RENAMED
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/client.py
RENAMED
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/conftest.py
RENAMED
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/conversion.py
RENAMED
|
File without changes
|
{frequenz-client-base-0.8.0 → frequenz_client_base-0.9.0}/src/frequenz/client/base/exception.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|