@tornado.gen.coroutine
    def getprop(self, ctx, loctx, key):
        wid = self.wid
        iid = self.iid
        app = ctx.app
        dependencies = ctx.dependencies

        if not self.perms.canread(key):
            raise Exception('Cannot read this key from foreign world: %s' % (key,))
        
        if iid is not None:
            res = yield app.propcache.get(('instanceprop', iid, None, key),
                                          dependencies=dependencies)
            if res:
                val = res.val
                if isinstance(val, (list, dict)):
                    if not self.perms.canwrite(key, val):
                        val = two.propcache.deepcopy(val)
                return val
    
        if True:
            res = yield app.propcache.get(('worldprop', wid, None, key),
                                          dependencies=dependencies)
            if res:
                val = res.val
                if isinstance(val, (list, dict)):
                    if not self.perms.canwrite(key, val):
                        val = two.propcache.deepcopy(val)
                return val

        raise AttributeError('Realm property "%s" is not found' % (key,))
Get a realm-level property. This checks both the instance
dataset/ETHPy150Open erkyrath/tworld/lib/two/execute.py/RemoteRealmProxy.getprop