class immp.plug.dummy.DummyPlug(name, config, host)#

Bases: Plug

Test plug that yields a message every 10 seconds.

async start()#

Perform any underlying operations needed to ready this resource for use, such as opening connections to an external network or API.

If using an event-driven framework that yields and runs in the background, you should use a signal of some form (e.g. asyncio.Condition) to block this method until the framework is ready for use.

async stop()#

Perform any underlying operations needed to stop using this resource and tidy up, such as terminating open network connections.

Like with start(), this should block as needed to wait for other frameworks – this method should return only when ready to be started again.

async put(channel, msg)#

Take a Message object, and push it to the underlying network.

Because some plugs may not support combinations of message components (such as text and an accompanying image), this method may send more than one physical message.

  • channel (.Channel) – Target channel for the new message.

  • msg (.Message) – Original message received from another channel or plug.


References to new messages sent to the plug.

Return type:

.Receipt list