Skip to content

weather_pb2_grpc

frequenz.api.weather.weather_pb2_grpc ¤

Client and server classes corresponding to protobuf-defined services.

Classes¤

frequenz.api.weather.weather_pb2_grpc.WeatherForecastService ¤

Bases: object

Service provides operations related to retrieving weather forecasts for locations.

The forecasts are updated regularly, and the service will stream the latest available data unless a specific time range is requested.

Note

Weather forecasts are inherently uncertain and actual conditions may vary. Use the data responsibly.

Source code in frequenz/api/weather/weather_pb2_grpc.py
class WeatherForecastService(object):
    """Service provides operations related to retrieving weather forecasts for
    locations.

    The forecasts are updated regularly, and the service will stream the latest
    available data unless a specific time range is requested.
    !!! note
    Weather forecasts are inherently uncertain and actual conditions may
    vary. Use the data responsibly.
    """

    @staticmethod
    def GetHistoricalWeatherForecast(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/frequenz.api.weatherforecast.v1.WeatherForecastService/GetHistoricalWeatherForecast',
            frequenz_dot_api_dot_weather_dot_weather__pb2.GetHistoricalWeatherForecastRequest.SerializeToString,
            frequenz_dot_api_dot_weather_dot_weather__pb2.GetHistoricalWeatherForecastResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReceiveLiveWeatherForecast(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_stream(request, target, '/frequenz.api.weatherforecast.v1.WeatherForecastService/ReceiveLiveWeatherForecast',
            frequenz_dot_api_dot_weather_dot_weather__pb2.ReceiveLiveWeatherForecastRequest.SerializeToString,
            frequenz_dot_api_dot_weather_dot_weather__pb2.ReceiveLiveWeatherForecastResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

frequenz.api.weather.weather_pb2_grpc.WeatherForecastServiceAsyncStub ¤

Service provides operations related to retrieving weather forecasts for locations.

The forecasts are updated regularly, and the service will stream the latest available data unless a specific time range is requested.

Note

Weather forecasts are inherently uncertain and actual conditions may vary. Use the data responsibly.

Source code in frequenz/api/weather/weather_pb2_grpc.py
    def ReceiveLiveWeatherForecast(self, request, context):
        """Streams live weather forecast features for a geo location as they become
        available. Initially, the most recent forecast will be streamed.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_WeatherForecastServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetHistoricalWeatherForecast': grpc.unary_unary_rpc_method_handler(
                    servicer.GetHistoricalWeatherForecast,
                    request_deserializer=frequenz_dot_api_dot_weather_dot_weather__pb2.GetHistoricalWeatherForecastRequest.FromString,
                    response_serializer=frequenz_dot_api_dot_weather_dot_weather__pb2.GetHistoricalWeatherForecastResponse.SerializeToString,
            ),
            'ReceiveLiveWeatherForecast': grpc.unary_stream_rpc_method_handler(
                    servicer.ReceiveLiveWeatherForecast,
                    request_deserializer=frequenz_dot_api_dot_weather_dot_weather__pb2.ReceiveLiveWeatherForecastRequest.FromString,
                    response_serializer=frequenz_dot_api_dot_weather_dot_weather__pb2.ReceiveLiveWeatherForecastResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'frequenz.api.weatherforecast.v1.WeatherForecastService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
Attributes¤
GetHistoricalWeatherForecast instance-attribute ¤

Returns historical weather forecast features for a geo location for a specified time range.

ReceiveLiveWeatherForecast instance-attribute ¤

Streams live weather forecast features for a geo location as they become available. Initially, the most recent forecast will be streamed.

frequenz.api.weather.weather_pb2_grpc.WeatherForecastServiceServicer ¤

Bases: object

Service provides operations related to retrieving weather forecasts for locations.

The forecasts are updated regularly, and the service will stream the latest available data unless a specific time range is requested.

Note

Weather forecasts are inherently uncertain and actual conditions may vary. Use the data responsibly.

Source code in frequenz/api/weather/weather_pb2_grpc.py
class WeatherForecastServiceServicer(object):
    """Service provides operations related to retrieving weather forecasts for
    locations.

    The forecasts are updated regularly, and the service will stream the latest
    available data unless a specific time range is requested.
    !!! note
    Weather forecasts are inherently uncertain and actual conditions may
    vary. Use the data responsibly.
    """

    def GetHistoricalWeatherForecast(self, request, context):
        """Returns historical weather forecast features for a geo location for a
        specified time range.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ReceiveLiveWeatherForecast(self, request, context):
        """Streams live weather forecast features for a geo location as they become
        available. Initially, the most recent forecast will be streamed.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')
Functions¤
GetHistoricalWeatherForecast ¤
GetHistoricalWeatherForecast(
    request: GetHistoricalWeatherForecastRequest,
    context: _ServicerContext,
) -> Union[
    GetHistoricalWeatherForecastResponse,
    Awaitable[GetHistoricalWeatherForecastResponse],
]

Returns historical weather forecast features for a geo location for a specified time range.

Source code in frequenz/api/weather/weather_pb2_grpc.py
def GetHistoricalWeatherForecast(self, request, context):
    """Returns historical weather forecast features for a geo location for a
    specified time range.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')
ReceiveLiveWeatherForecast ¤

Streams live weather forecast features for a geo location as they become available. Initially, the most recent forecast will be streamed.

Source code in frequenz/api/weather/weather_pb2_grpc.py
def ReceiveLiveWeatherForecast(self, request, context):
    """Streams live weather forecast features for a geo location as they become
    available. Initially, the most recent forecast will be streamed.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

frequenz.api.weather.weather_pb2_grpc.WeatherForecastServiceStub ¤

Bases: object

Service provides operations related to retrieving weather forecasts for locations.

The forecasts are updated regularly, and the service will stream the latest available data unless a specific time range is requested.

Note

Weather forecasts are inherently uncertain and actual conditions may vary. Use the data responsibly.

Source code in frequenz/api/weather/weather_pb2_grpc.py
class WeatherForecastServiceStub(object):
    """Service provides operations related to retrieving weather forecasts for
    locations.

    The forecasts are updated regularly, and the service will stream the latest
    available data unless a specific time range is requested.
    !!! note
    Weather forecasts are inherently uncertain and actual conditions may
    vary. Use the data responsibly.
    """

    def __init__(self, channel):
        """Constructor.

        Args:
            channel: A grpc.Channel.
        """
        self.GetHistoricalWeatherForecast = channel.unary_unary(
                '/frequenz.api.weatherforecast.v1.WeatherForecastService/GetHistoricalWeatherForecast',
                request_serializer=frequenz_dot_api_dot_weather_dot_weather__pb2.GetHistoricalWeatherForecastRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_weather_dot_weather__pb2.GetHistoricalWeatherForecastResponse.FromString,
                )
        self.ReceiveLiveWeatherForecast = channel.unary_stream(
                '/frequenz.api.weatherforecast.v1.WeatherForecastService/ReceiveLiveWeatherForecast',
                request_serializer=frequenz_dot_api_dot_weather_dot_weather__pb2.ReceiveLiveWeatherForecastRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_weather_dot_weather__pb2.ReceiveLiveWeatherForecastResponse.FromString,
                )
Attributes¤
GetHistoricalWeatherForecast instance-attribute ¤
GetHistoricalWeatherForecast: UnaryUnaryMultiCallable[
    GetHistoricalWeatherForecastRequest,
    GetHistoricalWeatherForecastResponse,
] = unary_unary(
    "/frequenz.api.weatherforecast.v1.WeatherForecastService/GetHistoricalWeatherForecast",
    request_serializer=SerializeToString,
    response_deserializer=FromString,
)

Returns historical weather forecast features for a geo location for a specified time range.

ReceiveLiveWeatherForecast instance-attribute ¤
ReceiveLiveWeatherForecast: UnaryStreamMultiCallable[
    ReceiveLiveWeatherForecastRequest,
    ReceiveLiveWeatherForecastResponse,
] = unary_stream(
    "/frequenz.api.weatherforecast.v1.WeatherForecastService/ReceiveLiveWeatherForecast",
    request_serializer=SerializeToString,
    response_deserializer=FromString,
)

Streams live weather forecast features for a geo location as they become available. Initially, the most recent forecast will be streamed.

Functions¤
__init__ ¤
__init__(channel: Union[Channel, Channel]) -> None

Constructor.

PARAMETER DESCRIPTION
channel

A grpc.Channel.

TYPE: Union[Channel, Channel]

Source code in frequenz/api/weather/weather_pb2_grpc.py
def __init__(self, channel):
    """Constructor.

    Args:
        channel: A grpc.Channel.
    """
    self.GetHistoricalWeatherForecast = channel.unary_unary(
            '/frequenz.api.weatherforecast.v1.WeatherForecastService/GetHistoricalWeatherForecast',
            request_serializer=frequenz_dot_api_dot_weather_dot_weather__pb2.GetHistoricalWeatherForecastRequest.SerializeToString,
            response_deserializer=frequenz_dot_api_dot_weather_dot_weather__pb2.GetHistoricalWeatherForecastResponse.FromString,
            )
    self.ReceiveLiveWeatherForecast = channel.unary_stream(
            '/frequenz.api.weatherforecast.v1.WeatherForecastService/ReceiveLiveWeatherForecast',
            request_serializer=frequenz_dot_api_dot_weather_dot_weather__pb2.ReceiveLiveWeatherForecastRequest.SerializeToString,
            response_deserializer=frequenz_dot_api_dot_weather_dot_weather__pb2.ReceiveLiveWeatherForecastResponse.FromString,
            )