def create_from_dict(self, dictionary):
        """ Initializes an instance from a dictionary blueprint """
        # Defaults
        args = []
        kwargs = {}
        factory_method = None
        factory_args = []
        factory_kwargs = {}
        static = False
        calls = None

        # Check dictionary for arguments
        if 'args' in dictionary:
            args = dictionary['args']

        if 'kwargs' in dictionary:
            kwargs = dictionary['kwargs']

        if 'factory-method' in dictionary:
            factory_method = dictionary['factory-method']

        if 'factory-args' in dictionary:
            factory_args = dictionary['factory-args']

        if 'factory-kwargs' in dictionary:
            factory_kwargs = dictionary['factory-kwargs']

        if 'static' in dictionary:
            static = dictionary['static']

        if 'calls' in dictionary:
            calls = dictionary['calls']

        return self.create(
            dictionary['module'],
            dictionary['class'],
            args=args,
            kwargs=kwargs,
            factory_method=factory_method,
            factory_args=factory_args,
            factory_kwargs=factory_kwargs,
            static=static,
            calls=calls
        )
def create_from_dict ( self , dictionary ) : args = [ ] kwargs = { } factory_method = None factory_args = [ ] factory_kwargs = { } static = False calls = None if 'args' in dictionary : args = dictionary [ 'args' ] if 'kwargs' in dictionary : kwargs = dictionary [ 'kwargs' ] if 'factory-method' in dictionary : factory_method = dictionary [ 'factory-method' ] if 'factory-args' in dictionary : factory_args = dictionary [ 'factory-args' ] if 'factory-kwargs' in dictionary : factory_kwargs = dictionary [ 'factory-kwargs' ] if 'static' in dictionary : static = dictionary [ 'static' ] if 'calls' in dictionary : calls = dictionary [ 'calls' ] return self . create ( dictionary [ 'module' ] , dictionary [ 'class' ] , args = args , kwargs = kwargs , factory_method = factory_method , factory_args = factory_args , factory_kwargs = factory_kwargs , static = static , calls = calls )
Initializes an instance from a dictionary blueprint