Skip to content

dispatch_pb2_grpc

frequenz.api.dispatch.v1.dispatch_pb2_grpc ¤

Client and server classes corresponding to protobuf-defined services.

Classes¤

frequenz.api.dispatch.v1.dispatch_pb2_grpc.MicrogridDispatchService ¤

Bases: object

Service providing operations related to dispatching microgrid components.

Overview¤

The API serves to automate the process of electricity dispatches for microgrids. In the context of the energy industry, a 'dispatch' refers to the act of routing electrical power between different components within a microgrid or between a microgrid and the main grid. This could be for the purpose of supply (sending electricity to the grid or components within the microgrid), or demand (drawing electricity from the grid or from other components like batteries and solar arrays).

Objective¤

The primary objective of this API is to streamline and automate the complex task of electricity dispatching, making it easier to manage local electricity supply and demand efficiently.

Key Features¤
  • Dispatching Electricity: Comprehensive CRUD operations for dispatching microgrid components.
  • Automation: Support for one-time as well as recurring dispatches based on flexible recurrence rules.
  • Fine-grained control: Dispatch individual microgrid components or entire component categories.
Example Use Cases¤
  • Charging or discharging a battery based on optimal time-of-use rates.
  • Limiting the output of a Photovoltaic (PV) array during periods of low demand.
  • Invoking Frequency Containment Reserves (FCR) or Automatic Frequency Restoration Reserves (aFRR) to support grid operations.
  • Adjusting the output of electric vehicle charging stations to match grid availability or to avoid peak pricing.
Target Audience¤

This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge in electrical engineering and systems.

Security¤

ALL requests to this service must be signed. The key and signature should be added to the request metadata (HTTP headers). The signature should be computed using the HMAC-SHA256 algorithm and the user's secret key.

ALL requests to this service must be made over HTTPS.

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
class MicrogridDispatchService(object):
    """Service providing operations related to dispatching microgrid components.

    #### Overview

    The API serves to automate the process of electricity dispatches for microgrids.
    In the context of the energy industry, a 'dispatch' refers to the act of routing electrical power
    between different components within a microgrid or between a microgrid and the main grid.
    This could be for the purpose of supply (sending electricity to the grid or components within the microgrid),
    or demand (drawing electricity from the grid or from other components like batteries and solar arrays).

    #### Objective

    The primary objective of this API is to streamline and automate the complex task of electricity dispatching,
    making it easier to manage local electricity supply and demand efficiently.

    #### Key Features

    - Dispatching Electricity: Comprehensive CRUD operations for dispatching microgrid components.
    - Automation: Support for one-time as well as recurring dispatches based on flexible recurrence rules.
    - Fine-grained control: Dispatch individual microgrid components or entire component categories.

    #### Example Use Cases

    - Charging or discharging a battery based on optimal time-of-use rates.
    - Limiting the output of a Photovoltaic (PV) array during periods of low demand.
    - Invoking Frequency Containment Reserves (FCR) or Automatic Frequency Restoration Reserves (aFRR) to
    support grid operations.
    - Adjusting the output of electric vehicle charging stations to match grid availability or to avoid peak pricing.

    #### Target Audience

    This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid
    electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge in
    electrical engineering and systems.

    #### Security

    ALL requests to this service must be signed. The key and signature
    should be added to the request metadata (HTTP headers). The signature
    should be computed using the HMAC-SHA256 algorithm and the user's secret key.

    ALL requests to this service must be made over HTTPS.
    """

    @staticmethod
    def ListMicrogridDispatches(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.dispatch.v1.MicrogridDispatchService/ListMicrogridDispatches',
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.ListMicrogridDispatchesRequest.SerializeToString,
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.ListMicrogridDispatchesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StreamMicrogridDispatches(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.dispatch.v1.MicrogridDispatchService/StreamMicrogridDispatches',
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.StreamMicrogridDispatchesRequest.SerializeToString,
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.StreamMicrogridDispatchesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateMicrogridDispatch(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.dispatch.v1.MicrogridDispatchService/CreateMicrogridDispatch',
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.CreateMicrogridDispatchRequest.SerializeToString,
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.CreateMicrogridDispatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UpdateMicrogridDispatch(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.dispatch.v1.MicrogridDispatchService/UpdateMicrogridDispatch',
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.UpdateMicrogridDispatchRequest.SerializeToString,
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.UpdateMicrogridDispatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetMicrogridDispatch(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.dispatch.v1.MicrogridDispatchService/GetMicrogridDispatch',
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.GetMicrogridDispatchRequest.SerializeToString,
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.GetMicrogridDispatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteMicrogridDispatch(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.dispatch.v1.MicrogridDispatchService/DeleteMicrogridDispatch',
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.DeleteMicrogridDispatchRequest.SerializeToString,
            frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.DeleteMicrogridDispatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

frequenz.api.dispatch.v1.dispatch_pb2_grpc.MicrogridDispatchServiceAsyncStub ¤

Service providing operations related to dispatching microgrid components.

Overview¤

The API serves to automate the process of electricity dispatches for microgrids. In the context of the energy industry, a 'dispatch' refers to the act of routing electrical power between different components within a microgrid or between a microgrid and the main grid. This could be for the purpose of supply (sending electricity to the grid or components within the microgrid), or demand (drawing electricity from the grid or from other components like batteries and solar arrays).

Objective¤

The primary objective of this API is to streamline and automate the complex task of electricity dispatching, making it easier to manage local electricity supply and demand efficiently.

Key Features¤
  • Dispatching Electricity: Comprehensive CRUD operations for dispatching microgrid components.
  • Automation: Support for one-time as well as recurring dispatches based on flexible recurrence rules.
  • Fine-grained control: Dispatch individual microgrid components or entire component categories.
Example Use Cases¤
  • Charging or discharging a battery based on optimal time-of-use rates.
  • Limiting the output of a Photovoltaic (PV) array during periods of low demand.
  • Invoking Frequency Containment Reserves (FCR) or Automatic Frequency Restoration Reserves (aFRR) to support grid operations.
  • Adjusting the output of electric vehicle charging stations to match grid availability or to avoid peak pricing.
Target Audience¤

This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge in electrical engineering and systems.

Security¤

ALL requests to this service must be signed. The key and signature should be added to the request metadata (HTTP headers). The signature should be computed using the HMAC-SHA256 algorithm and the user's secret key.

ALL requests to this service must be made over HTTPS.

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
        self.DeleteMicrogridDispatch = channel.unary_unary(
                '/frequenz.api.dispatch.v1.MicrogridDispatchService/DeleteMicrogridDispatch',
                request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.DeleteMicrogridDispatchRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.DeleteMicrogridDispatchResponse.FromString,
                _registered_method=True)


class MicrogridDispatchServiceServicer(object):
    """Service providing operations related to dispatching microgrid components.

    #### Overview

    The API serves to automate the process of electricity dispatches for microgrids.
    In the context of the energy industry, a 'dispatch' refers to the act of routing electrical power
    between different components within a microgrid or between a microgrid and the main grid.
    This could be for the purpose of supply (sending electricity to the grid or components within the microgrid),
    or demand (drawing electricity from the grid or from other components like batteries and solar arrays).

    #### Objective

    The primary objective of this API is to streamline and automate the complex task of electricity dispatching,
    making it easier to manage local electricity supply and demand efficiently.

    #### Key Features

    - Dispatching Electricity: Comprehensive CRUD operations for dispatching microgrid components.
    - Automation: Support for one-time as well as recurring dispatches based on flexible recurrence rules.
    - Fine-grained control: Dispatch individual microgrid components or entire component categories.

    #### Example Use Cases

    - Charging or discharging a battery based on optimal time-of-use rates.
    - Limiting the output of a Photovoltaic (PV) array during periods of low demand.
    - Invoking Frequency Containment Reserves (FCR) or Automatic Frequency Restoration Reserves (aFRR) to
    support grid operations.
    - Adjusting the output of electric vehicle charging stations to match grid availability or to avoid peak pricing.

    #### Target Audience

    This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid
    electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge in
    electrical engineering and systems.

    #### Security

    ALL requests to this service must be signed. The key and signature
    should be added to the request metadata (HTTP headers). The signature
    should be computed using the HMAC-SHA256 algorithm and the user's secret key.

    ALL requests to this service must be made over HTTPS.
    """

    def ListMicrogridDispatches(self, request, context):
        """Returns a list of all dispatches
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamMicrogridDispatches(self, request, context):
        """Streaming RPC for receiving dispatch updates for a given microgrid
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateMicrogridDispatch(self, request, context):
        """Create a new dispatch
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateMicrogridDispatch(self, request, context):
        """Update a dispatch
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')
Attributes¤
CreateMicrogridDispatch instance-attribute ¤

Create a new dispatch

DeleteMicrogridDispatch instance-attribute ¤

Delete a given dispatch

GetMicrogridDispatch instance-attribute ¤

Get a single dispatch

ListMicrogridDispatches instance-attribute ¤

Returns a list of all dispatches

StreamMicrogridDispatches instance-attribute ¤

Streaming RPC for receiving dispatch updates for a given microgrid

UpdateMicrogridDispatch instance-attribute ¤

Update a dispatch

frequenz.api.dispatch.v1.dispatch_pb2_grpc.MicrogridDispatchServiceServicer ¤

Bases: object

Service providing operations related to dispatching microgrid components.

Overview¤

The API serves to automate the process of electricity dispatches for microgrids. In the context of the energy industry, a 'dispatch' refers to the act of routing electrical power between different components within a microgrid or between a microgrid and the main grid. This could be for the purpose of supply (sending electricity to the grid or components within the microgrid), or demand (drawing electricity from the grid or from other components like batteries and solar arrays).

Objective¤

The primary objective of this API is to streamline and automate the complex task of electricity dispatching, making it easier to manage local electricity supply and demand efficiently.

Key Features¤
  • Dispatching Electricity: Comprehensive CRUD operations for dispatching microgrid components.
  • Automation: Support for one-time as well as recurring dispatches based on flexible recurrence rules.
  • Fine-grained control: Dispatch individual microgrid components or entire component categories.
Example Use Cases¤
  • Charging or discharging a battery based on optimal time-of-use rates.
  • Limiting the output of a Photovoltaic (PV) array during periods of low demand.
  • Invoking Frequency Containment Reserves (FCR) or Automatic Frequency Restoration Reserves (aFRR) to support grid operations.
  • Adjusting the output of electric vehicle charging stations to match grid availability or to avoid peak pricing.
Target Audience¤

This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge in electrical engineering and systems.

Security¤

ALL requests to this service must be signed. The key and signature should be added to the request metadata (HTTP headers). The signature should be computed using the HMAC-SHA256 algorithm and the user's secret key.

ALL requests to this service must be made over HTTPS.

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
class MicrogridDispatchServiceServicer(object):
    """Service providing operations related to dispatching microgrid components.

    #### Overview

    The API serves to automate the process of electricity dispatches for microgrids.
    In the context of the energy industry, a 'dispatch' refers to the act of routing electrical power
    between different components within a microgrid or between a microgrid and the main grid.
    This could be for the purpose of supply (sending electricity to the grid or components within the microgrid),
    or demand (drawing electricity from the grid or from other components like batteries and solar arrays).

    #### Objective

    The primary objective of this API is to streamline and automate the complex task of electricity dispatching,
    making it easier to manage local electricity supply and demand efficiently.

    #### Key Features

    - Dispatching Electricity: Comprehensive CRUD operations for dispatching microgrid components.
    - Automation: Support for one-time as well as recurring dispatches based on flexible recurrence rules.
    - Fine-grained control: Dispatch individual microgrid components or entire component categories.

    #### Example Use Cases

    - Charging or discharging a battery based on optimal time-of-use rates.
    - Limiting the output of a Photovoltaic (PV) array during periods of low demand.
    - Invoking Frequency Containment Reserves (FCR) or Automatic Frequency Restoration Reserves (aFRR) to
    support grid operations.
    - Adjusting the output of electric vehicle charging stations to match grid availability or to avoid peak pricing.

    #### Target Audience

    This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid
    electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge in
    electrical engineering and systems.

    #### Security

    ALL requests to this service must be signed. The key and signature
    should be added to the request metadata (HTTP headers). The signature
    should be computed using the HMAC-SHA256 algorithm and the user's secret key.

    ALL requests to this service must be made over HTTPS.
    """

    def ListMicrogridDispatches(self, request, context):
        """Returns a list of all dispatches
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamMicrogridDispatches(self, request, context):
        """Streaming RPC for receiving dispatch updates for a given microgrid
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CreateMicrogridDispatch(self, request, context):
        """Create a new dispatch
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def UpdateMicrogridDispatch(self, request, context):
        """Update a dispatch
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetMicrogridDispatch(self, request, context):
        """Get a single dispatch
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteMicrogridDispatch(self, request, context):
        """Delete a given dispatch
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')
Functions¤
CreateMicrogridDispatch ¤
CreateMicrogridDispatch(
    request: CreateMicrogridDispatchRequest,
    context: _ServicerContext,
) -> Union[
    CreateMicrogridDispatchResponse,
    Awaitable[CreateMicrogridDispatchResponse],
]

Create a new dispatch

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
def CreateMicrogridDispatch(self, request, context):
    """Create a new dispatch
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')
DeleteMicrogridDispatch ¤
DeleteMicrogridDispatch(
    request: DeleteMicrogridDispatchRequest,
    context: _ServicerContext,
) -> Union[
    DeleteMicrogridDispatchResponse,
    Awaitable[DeleteMicrogridDispatchResponse],
]

Delete a given dispatch

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
def DeleteMicrogridDispatch(self, request, context):
    """Delete a given dispatch
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')
GetMicrogridDispatch ¤
GetMicrogridDispatch(
    request: GetMicrogridDispatchRequest,
    context: _ServicerContext,
) -> Union[
    GetMicrogridDispatchResponse,
    Awaitable[GetMicrogridDispatchResponse],
]

Get a single dispatch

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
def GetMicrogridDispatch(self, request, context):
    """Get a single dispatch
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')
ListMicrogridDispatches ¤
ListMicrogridDispatches(
    request: ListMicrogridDispatchesRequest,
    context: _ServicerContext,
) -> Union[
    ListMicrogridDispatchesResponse,
    Awaitable[ListMicrogridDispatchesResponse],
]

Returns a list of all dispatches

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
def ListMicrogridDispatches(self, request, context):
    """Returns a list of all dispatches
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')
StreamMicrogridDispatches ¤

Streaming RPC for receiving dispatch updates for a given microgrid

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
def StreamMicrogridDispatches(self, request, context):
    """Streaming RPC for receiving dispatch updates for a given microgrid
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')
UpdateMicrogridDispatch ¤
UpdateMicrogridDispatch(
    request: UpdateMicrogridDispatchRequest,
    context: _ServicerContext,
) -> Union[
    UpdateMicrogridDispatchResponse,
    Awaitable[UpdateMicrogridDispatchResponse],
]

Update a dispatch

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
def UpdateMicrogridDispatch(self, request, context):
    """Update a dispatch
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

frequenz.api.dispatch.v1.dispatch_pb2_grpc.MicrogridDispatchServiceStub ¤

Bases: object

Service providing operations related to dispatching microgrid components.

Overview¤

The API serves to automate the process of electricity dispatches for microgrids. In the context of the energy industry, a 'dispatch' refers to the act of routing electrical power between different components within a microgrid or between a microgrid and the main grid. This could be for the purpose of supply (sending electricity to the grid or components within the microgrid), or demand (drawing electricity from the grid or from other components like batteries and solar arrays).

Objective¤

The primary objective of this API is to streamline and automate the complex task of electricity dispatching, making it easier to manage local electricity supply and demand efficiently.

Key Features¤
  • Dispatching Electricity: Comprehensive CRUD operations for dispatching microgrid components.
  • Automation: Support for one-time as well as recurring dispatches based on flexible recurrence rules.
  • Fine-grained control: Dispatch individual microgrid components or entire component categories.
Example Use Cases¤
  • Charging or discharging a battery based on optimal time-of-use rates.
  • Limiting the output of a Photovoltaic (PV) array during periods of low demand.
  • Invoking Frequency Containment Reserves (FCR) or Automatic Frequency Restoration Reserves (aFRR) to support grid operations.
  • Adjusting the output of electric vehicle charging stations to match grid availability or to avoid peak pricing.
Target Audience¤

This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge in electrical engineering and systems.

Security¤

ALL requests to this service must be signed. The key and signature should be added to the request metadata (HTTP headers). The signature should be computed using the HMAC-SHA256 algorithm and the user's secret key.

ALL requests to this service must be made over HTTPS.

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
class MicrogridDispatchServiceStub(object):
    """Service providing operations related to dispatching microgrid components.

    #### Overview

    The API serves to automate the process of electricity dispatches for microgrids.
    In the context of the energy industry, a 'dispatch' refers to the act of routing electrical power
    between different components within a microgrid or between a microgrid and the main grid.
    This could be for the purpose of supply (sending electricity to the grid or components within the microgrid),
    or demand (drawing electricity from the grid or from other components like batteries and solar arrays).

    #### Objective

    The primary objective of this API is to streamline and automate the complex task of electricity dispatching,
    making it easier to manage local electricity supply and demand efficiently.

    #### Key Features

    - Dispatching Electricity: Comprehensive CRUD operations for dispatching microgrid components.
    - Automation: Support for one-time as well as recurring dispatches based on flexible recurrence rules.
    - Fine-grained control: Dispatch individual microgrid components or entire component categories.

    #### Example Use Cases

    - Charging or discharging a battery based on optimal time-of-use rates.
    - Limiting the output of a Photovoltaic (PV) array during periods of low demand.
    - Invoking Frequency Containment Reserves (FCR) or Automatic Frequency Restoration Reserves (aFRR) to
    support grid operations.
    - Adjusting the output of electric vehicle charging stations to match grid availability or to avoid peak pricing.

    #### Target Audience

    This API is designed for application developers in the energy sector who focus on the tasks of optimizing microgrid
    electricity flows. Its design aims to be as developer-friendly as possible, requiring no prior knowledge in
    electrical engineering and systems.

    #### Security

    ALL requests to this service must be signed. The key and signature
    should be added to the request metadata (HTTP headers). The signature
    should be computed using the HMAC-SHA256 algorithm and the user's secret key.

    ALL requests to this service must be made over HTTPS.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListMicrogridDispatches = channel.unary_unary(
                '/frequenz.api.dispatch.v1.MicrogridDispatchService/ListMicrogridDispatches',
                request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.ListMicrogridDispatchesRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.ListMicrogridDispatchesResponse.FromString,
                _registered_method=True)
        self.StreamMicrogridDispatches = channel.unary_stream(
                '/frequenz.api.dispatch.v1.MicrogridDispatchService/StreamMicrogridDispatches',
                request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.StreamMicrogridDispatchesRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.StreamMicrogridDispatchesResponse.FromString,
                _registered_method=True)
        self.CreateMicrogridDispatch = channel.unary_unary(
                '/frequenz.api.dispatch.v1.MicrogridDispatchService/CreateMicrogridDispatch',
                request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.CreateMicrogridDispatchRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.CreateMicrogridDispatchResponse.FromString,
                _registered_method=True)
        self.UpdateMicrogridDispatch = channel.unary_unary(
                '/frequenz.api.dispatch.v1.MicrogridDispatchService/UpdateMicrogridDispatch',
                request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.UpdateMicrogridDispatchRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.UpdateMicrogridDispatchResponse.FromString,
                _registered_method=True)
        self.GetMicrogridDispatch = channel.unary_unary(
                '/frequenz.api.dispatch.v1.MicrogridDispatchService/GetMicrogridDispatch',
                request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.GetMicrogridDispatchRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.GetMicrogridDispatchResponse.FromString,
                _registered_method=True)
        self.DeleteMicrogridDispatch = channel.unary_unary(
                '/frequenz.api.dispatch.v1.MicrogridDispatchService/DeleteMicrogridDispatch',
                request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.DeleteMicrogridDispatchRequest.SerializeToString,
                response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.DeleteMicrogridDispatchResponse.FromString,
                _registered_method=True)
Attributes¤
CreateMicrogridDispatch instance-attribute ¤
CreateMicrogridDispatch: UnaryUnaryMultiCallable[
    CreateMicrogridDispatchRequest,
    CreateMicrogridDispatchResponse,
] = unary_unary(
    "/frequenz.api.dispatch.v1.MicrogridDispatchService/CreateMicrogridDispatch",
    request_serializer=SerializeToString,
    response_deserializer=FromString,
    _registered_method=True,
)

Create a new dispatch

DeleteMicrogridDispatch instance-attribute ¤
DeleteMicrogridDispatch: UnaryUnaryMultiCallable[
    DeleteMicrogridDispatchRequest,
    DeleteMicrogridDispatchResponse,
] = unary_unary(
    "/frequenz.api.dispatch.v1.MicrogridDispatchService/DeleteMicrogridDispatch",
    request_serializer=SerializeToString,
    response_deserializer=FromString,
    _registered_method=True,
)

Delete a given dispatch

GetMicrogridDispatch instance-attribute ¤
GetMicrogridDispatch: UnaryUnaryMultiCallable[
    GetMicrogridDispatchRequest,
    GetMicrogridDispatchResponse,
] = unary_unary(
    "/frequenz.api.dispatch.v1.MicrogridDispatchService/GetMicrogridDispatch",
    request_serializer=SerializeToString,
    response_deserializer=FromString,
    _registered_method=True,
)

Get a single dispatch

ListMicrogridDispatches instance-attribute ¤
ListMicrogridDispatches: UnaryUnaryMultiCallable[
    ListMicrogridDispatchesRequest,
    ListMicrogridDispatchesResponse,
] = unary_unary(
    "/frequenz.api.dispatch.v1.MicrogridDispatchService/ListMicrogridDispatches",
    request_serializer=SerializeToString,
    response_deserializer=FromString,
    _registered_method=True,
)

Returns a list of all dispatches

StreamMicrogridDispatches instance-attribute ¤
StreamMicrogridDispatches: UnaryStreamMultiCallable[
    StreamMicrogridDispatchesRequest,
    StreamMicrogridDispatchesResponse,
] = unary_stream(
    "/frequenz.api.dispatch.v1.MicrogridDispatchService/StreamMicrogridDispatches",
    request_serializer=SerializeToString,
    response_deserializer=FromString,
    _registered_method=True,
)

Streaming RPC for receiving dispatch updates for a given microgrid

UpdateMicrogridDispatch instance-attribute ¤
UpdateMicrogridDispatch: UnaryUnaryMultiCallable[
    UpdateMicrogridDispatchRequest,
    UpdateMicrogridDispatchResponse,
] = unary_unary(
    "/frequenz.api.dispatch.v1.MicrogridDispatchService/UpdateMicrogridDispatch",
    request_serializer=SerializeToString,
    response_deserializer=FromString,
    _registered_method=True,
)

Update a dispatch

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

Constructor.

PARAMETER DESCRIPTION
channel

A grpc.Channel.

TYPE: Union[Channel, Channel]

Source code in frequenz/api/dispatch/v1/dispatch_pb2_grpc.py
def __init__(self, channel):
    """Constructor.

    Args:
        channel: A grpc.Channel.
    """
    self.ListMicrogridDispatches = channel.unary_unary(
            '/frequenz.api.dispatch.v1.MicrogridDispatchService/ListMicrogridDispatches',
            request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.ListMicrogridDispatchesRequest.SerializeToString,
            response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.ListMicrogridDispatchesResponse.FromString,
            _registered_method=True)
    self.StreamMicrogridDispatches = channel.unary_stream(
            '/frequenz.api.dispatch.v1.MicrogridDispatchService/StreamMicrogridDispatches',
            request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.StreamMicrogridDispatchesRequest.SerializeToString,
            response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.StreamMicrogridDispatchesResponse.FromString,
            _registered_method=True)
    self.CreateMicrogridDispatch = channel.unary_unary(
            '/frequenz.api.dispatch.v1.MicrogridDispatchService/CreateMicrogridDispatch',
            request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.CreateMicrogridDispatchRequest.SerializeToString,
            response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.CreateMicrogridDispatchResponse.FromString,
            _registered_method=True)
    self.UpdateMicrogridDispatch = channel.unary_unary(
            '/frequenz.api.dispatch.v1.MicrogridDispatchService/UpdateMicrogridDispatch',
            request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.UpdateMicrogridDispatchRequest.SerializeToString,
            response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.UpdateMicrogridDispatchResponse.FromString,
            _registered_method=True)
    self.GetMicrogridDispatch = channel.unary_unary(
            '/frequenz.api.dispatch.v1.MicrogridDispatchService/GetMicrogridDispatch',
            request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.GetMicrogridDispatchRequest.SerializeToString,
            response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.GetMicrogridDispatchResponse.FromString,
            _registered_method=True)
    self.DeleteMicrogridDispatch = channel.unary_unary(
            '/frequenz.api.dispatch.v1.MicrogridDispatchService/DeleteMicrogridDispatch',
            request_serializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.DeleteMicrogridDispatchRequest.SerializeToString,
            response_deserializer=frequenz_dot_api_dot_dispatch_dot_v1_dot_dispatch__pb2.DeleteMicrogridDispatchResponse.FromString,
            _registered_method=True)