How to use the aiozmq.rpc.method function in aiozmq

To help you get started, we’ve selected a few aiozmq examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aio-libs / aiozmq / tests / rpc_func_annotations.py View on Github external
            @aiozmq.rpc.method
            def test2() -> 'bad annotation':
                pass
github aio-libs / aiozmq / tests / rpc_func_annotations.py View on Github external
    @aiozmq.rpc.method
    @asyncio.coroutine
    def custom_annotation(self, arg: my_checker):
        return arg
        yield
github aio-libs / aiozmq / examples / rpc_custom_translator.py View on Github external
    @aiozmq.rpc.method
    def remote(self, val):
        return val
github aio-libs / aiozmq / examples / rpc_exception_translator.py View on Github external
    @aiozmq.rpc.method
    def remote(self, val):
        raise CustomError(val)
github aio-libs / aiozmq / examples / rpc_pipeline.py View on Github external
    @aiozmq.rpc.method
    def handle_some_event(self, a: int, b: int):
        pass
github aio-libs / aiozmq / examples / rpc_incorrect_calls.py View on Github external
    @aiozmq.rpc.method
    def remote_func(self, a: int, b: int) -> int:
        return a + b
github nanoporetech / pomoxis / pomoxis / provider / replayfast5.py View on Github external
    @rpc.method
    def time_saved(self):
        """Difference between current real time and simulated time. (How far
        we've fast-forwarded the channel.)

        """
        return sum(chan.time_saved for chan in self.replay_channels.values())
github lablup / backend.ai-agent / src / ai / backend / agent / server.py View on Github external
    @aiozmq.rpc.method
    async def shutdown_agent(self, terminate_kernels: bool):
        # TODO: implement
        log.debug('rpc::shutdown_agent()')
        pass
github nanoporetech / pomoxis / pomoxis / provider / replayfast5.py View on Github external
    @rpc.method
    def get_raw(self, channel, seconds=0.5):
        """Return raw data from the start of the current read.

        :param channel: channel for which to get raw data.

        :returns: Serialized raw data, see :class:`Fast5Data`.
        """
        return self.replay_channels[channel].get_raw(seconds=seconds)