def engine_options_from_config(config):
    """Return engine options derived from config object."""
    options = {}

    def _setdefault(optionkey, configkey):
        """Set options key if config key is not None."""
        if config.get(configkey) is not None:
            options[optionkey] = config[configkey]

    _setdefault('echo', 'SQLALCHEMY_ECHO')
    _setdefault('pool_size', 'SQLALCHEMY_POOL_SIZE')
    _setdefault('pool_timeout', 'SQLALCHEMY_POOL_TIMEOUT')
    _setdefault('pool_recycle', 'SQLALCHEMY_POOL_RECYCLE')
    _setdefault('max_overflow', 'SQLALCHEMY_MAX_OVERFLOW')

    return options