How to use the imjoy.utils.dotdict function in imjoy

To help you get started, we’ve selected a few imjoy 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 oeway / ImJoy-Engine / tests / mock_plugin.py View on Github external
async def init(self):
        """initialize the plugin."""
        opt = dotdict(id=self.pid, secret=self.secret)
        self.conn = PluginConnection(self, opt)
        self.conn.setup()
        self.terminated = False
        initialized = self.loop.create_future()
        self.on_plugin_message("initialized", initialized)
        self.on_plugin_message("disconnected", self.terminate)
        await initialized

        workers = [
            self.message_worker(self.janus_queue.async_q, self.conn.abort)
            for i in range(2)
        ]
        asyncio.ensure_future(asyncio.gather(*workers))
github oeway / ImJoy-Engine / tests / mock_plugin.py View on Github external
async def init(self):
        """initialize the plugin."""
        opt = dotdict(id=self.pid, secret=self.secret)
        self.conn = PluginConnection(opt, client=self)
        self.terminated = False
        initialized = self.loop.create_future()
        self.on_plugin_message("initialized", initialized)
        self.on_plugin_message("disconnected", self.terminate)
        await initialized

        workers = [
            self.message_worker(self.janus_queue.async_q, self.conn.abort)
            for i in range(2)
        ]
        asyncio.ensure_future(asyncio.gather(*workers))
github oeway / ImJoy-Engine / imjoy / utils.py View on Github external
def __deepcopy__(self, memo=None):
        """Make a deep copy."""
        return dotdict(copy.deepcopy(dict(self), memo=memo))
github oeway / ImJoy-Engine / imjoy / connection / __init__.py View on Github external
def __init__(self, engine, app, sio):
        """Set up connection instance attributes."""
        self.engine = engine
        self.app = app
        self.sio = sio
        self.store = dotdict()
        self.reset_store()