ezmsg.zmq.repreq#

Classes

class ZMQRep(*args, settings=None, **kwargs)[source]#

Bases: Unit

Parameters:

settings (Settings | None)

OUTPUT = OutputStream:unlocated[ZMQMessage](self.num_buffers=32, self.force_tcp=None, self.allow_local=None)#
SETTINGS#

alias of ZMQRepSettings

STATE#

alias of ZMQRepState

initialize()[source]#

Runs when the Unit is instantiated.

This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

This method is where you should initialize your unit’s state and prepare for message processing.

Return type:

None

shutdown()[source]#

Runs when the Unit terminates.

This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

This method is where you should clean up resources and perform any necessary shutdown procedures.

Return type:

None

async zmq_rep()[source]#
Return type:

None

async send_reqs()[source]#
Return type:

AsyncGenerator

class ZMQRepSettings(addr: str)[source]#

Bases: Settings

Parameters:

addr (str)

addr: str#
__init__(addr)#
Parameters:

addr (str)

Return type:

None

class ZMQRepState[source]#

Bases: State

context: Context#
socket: Socket#
queue: Queue#
class ZMQReq(*args, settings=None, **kwargs)[source]#

Bases: Unit

Parameters:

settings (Settings | None)

INPUT = InputStream:unlocated[ZMQMessage]()#
OUTPUT = OutputStream:unlocated[ZMQMessage](self.num_buffers=32, self.force_tcp=None, self.allow_local=None)#
SETTINGS#

alias of ZMQReqSettings

STATE#

alias of ZMQReqState

initialize()[source]#

Runs when the Unit is instantiated.

This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

This method is where you should initialize your unit’s state and prepare for message processing.

Return type:

None

shutdown()[source]#

Runs when the Unit terminates.

This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

This method is where you should clean up resources and perform any necessary shutdown procedures.

Return type:

None

async send_req(msg)[source]#
Parameters:

msg (ZMQMessage)

Return type:

None

class ZMQReqSettings(addr: str)[source]#

Bases: Settings

Parameters:

addr (str)

addr: str#
__init__(addr)#
Parameters:

addr (str)

Return type:

None

class ZMQReqState[source]#

Bases: State

context: Context#
socket: Socket#
monitor: Socket#
class ZMQRepSettings(addr: str)[source]#

Bases: Settings

Parameters:

addr (str)

addr: str#
__init__(addr)#
Parameters:

addr (str)

Return type:

None

class ZMQRepState[source]#

Bases: State

context: Context#
socket: Socket#
queue: Queue#
class ZMQRep(*args, settings=None, **kwargs)[source]#

Bases: Unit

Parameters:

settings (Settings | None)

OUTPUT = OutputStream:unlocated[ZMQMessage](self.num_buffers=32, self.force_tcp=None, self.allow_local=None)#
SETTINGS#

alias of ZMQRepSettings

STATE#

alias of ZMQRepState

initialize()[source]#

Runs when the Unit is instantiated.

This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

This method is where you should initialize your unit’s state and prepare for message processing.

Return type:

None

shutdown()[source]#

Runs when the Unit terminates.

This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

This method is where you should clean up resources and perform any necessary shutdown procedures.

Return type:

None

async zmq_rep()[source]#
Return type:

None

async send_reqs()[source]#
Return type:

AsyncGenerator

class ZMQReqSettings(addr: str)[source]#

Bases: Settings

Parameters:

addr (str)

addr: str#
__init__(addr)#
Parameters:

addr (str)

Return type:

None

class ZMQReqState[source]#

Bases: State

context: Context#
socket: Socket#
monitor: Socket#
class ZMQReq(*args, settings=None, **kwargs)[source]#

Bases: Unit

Parameters:

settings (Settings | None)

INPUT = InputStream:unlocated[ZMQMessage]()#
OUTPUT = OutputStream:unlocated[ZMQMessage](self.num_buffers=32, self.force_tcp=None, self.allow_local=None)#
SETTINGS#

alias of ZMQReqSettings

STATE#

alias of ZMQReqState

initialize()[source]#

Runs when the Unit is instantiated.

This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

This method is where you should initialize your unit’s state and prepare for message processing.

Return type:

None

shutdown()[source]#

Runs when the Unit terminates.

This is called from within the same process this unit will live in. This lifecycle hook can be overridden. It can be run as async functions by simply adding the async keyword when overriding.

This method is where you should clean up resources and perform any necessary shutdown procedures.

Return type:

None

async send_req(msg)[source]#
Parameters:

msg (ZMQMessage)

Return type:

None