Skip to content

Commit

Permalink
Update base client to v0.8.0
Browse files Browse the repository at this point in the history
Signed-off-by: cwasicki <[email protected]>
  • Loading branch information
cwasicki committed Nov 19, 2024
1 parent e6e9235 commit f0a1088
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies = [
"grpcio >= 1.54.2, < 2",
"grpcio-tools >= 1.54.2, < 2",
"protobuf >= 4.25.3, < 6",
"frequenz-client-base >= 0.6.0, < 0.7.0",
"frequenz-client-base >= 0.8.0, < 0.9.0",
]
dynamic = ["version"]

Expand Down
8 changes: 8 additions & 0 deletions src/frequenz/client/reporting/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from frequenz.api.reporting.v1.reporting_pb2 import TimeFilter as PBTimeFilter
from frequenz.api.reporting.v1.reporting_pb2_grpc import ReportingStub
from frequenz.client.base.client import BaseApiClient
from frequenz.client.base.exception import ClientNotConnected
from frequenz.client.common.metric import Metric
from google.protobuf.timestamp_pb2 import Timestamp as PBTimestamp

Expand Down Expand Up @@ -151,6 +152,13 @@ def __init__(self, server_url: str, key: str | None = None) -> None:

self._metadata = (("key", key),) if key else ()

@property
def stub(self) -> ReportingStub:
"""The gRPC stub for the API."""
if self.channel is None or self._stub is None:
raise ClientNotConnected(server_url=self.server_url, operation="stub")
return self._stub

# pylint: disable=too-many-arguments
async def list_single_component_data(
self,
Expand Down

0 comments on commit f0a1088

Please sign in to comment.