Пример #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'),
     )
Пример #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"),
     )
Пример #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}
     )
Пример #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'),
     )
Пример #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')
        )
Пример #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'))
Пример #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}
        )
Пример #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
            })