def from_dict(cls, data): return cls( jam.Storage(load_backend(data['storage']['backend'], **data['storage']['settings'])), jam.Logger(load_backend(data['logger']['backend'], **data['logger']['settings'])), jam.State(load_backend(data['state']['backend'], **data['state']['settings'])), schema=data.get('schema'), permissions=data.get('permissions'), )
def from_dict(cls, data): return cls( jam.Storage(load_backend(data["storage"]["backend"], **data["storage"]["settings"])), jam.Logger(load_backend(data["logger"]["backend"], **data["logger"]["settings"])), jam.State(load_backend(data["state"]["backend"], **data["state"]["settings"])), schema=data.get("schema"), permissions=data.get("permissions"), )
def __init__(self, uuid, name, storage, logger, state, permissions=None): self.uuid = uuid self.ref = name self.name = name super().__init__( jam.Storage(load_backend(storage['backend'], **storage['settings'])), jam.Logger(load_backend(logger['backend'], **logger['settings'])), jam.State(load_backend(state['backend'], **state['settings'])), permissions=permissions, schema={'type': 'jsonschema', 'schema': Collection.SCHEMA} )
def from_dict(cls, data): return cls( jam.Storage( load_backend(data['storage']['backend'], **data['storage']['settings'])), jam.Logger( load_backend(data['logger']['backend'], **data['logger']['settings'])), jam.State( load_backend(data['state']['backend'], **data['state']['settings'])), schema=data.get('schema'), permissions=data.get('permissions'), )
def __init__(self, document): self._document = document state = document.data['state'] logger = document.data['logger'] storage = document.data['storage'] super().__init__( jam.Storage(load_backend(storage['backend'], **storage['settings'])), jam.Logger(load_backend(logger['backend'], **logger['settings'])), jam.State(load_backend(state['backend'], **state['settings'])), permissions=document.data['permissions'], schema=document.data.get('schema') )
def __init__(self, document): self._document = document state = document.data['state'] logger = document.data['logger'] storage = document.data['storage'] super().__init__( jam.Storage(load_backend(storage['backend'], **storage['settings'])), jam.Logger(load_backend(logger['backend'], **logger['settings'])), jam.State(load_backend(state['backend'], **state['settings'])), permissions=document.data['permissions'], schema=document.data.get('schema'))
def __init__(self, document): self._document = document state = document.data['state'] logger = document.data['logger'] storage = document.data['storage'] super().__init__( jam.Storage(load_backend(storage['backend'], **storage['settings'])), jam.Logger(load_backend(logger['backend'], **logger['settings'])), jam.State(load_backend(state['backend'], **state['settings'])), permissions=document.data['permissions'], schema={'type': 'jsonschema', 'schema': Collection.SCHEMA} )
def __init__(self, document): self._document = document state = document.data['state'] logger = document.data['logger'] storage = document.data['storage'] super().__init__( jam.Storage(load_backend(storage['backend'], **storage['settings'])), jam.Logger(load_backend(logger['backend'], **logger['settings'])), jam.State(load_backend(state['backend'], **state['settings'])), permissions=document.data['permissions'], schema={ 'type': 'jsonschema', 'schema': Collection.SCHEMA })