Ejemplo n.º 1
0
 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'),
     )
Ejemplo n.º 2
0
 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"),
     )
Ejemplo n.º 3
0
 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}
     )
Ejemplo n.º 4
0
 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'),
     )
Ejemplo n.º 5
0
    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')
        )
Ejemplo n.º 6
0
    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'))
Ejemplo n.º 7
0
    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}
        )
Ejemplo n.º 8
0
    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
            })