from config import config

class BackendNotRecognizedException(Exception):
    """Possible backends are "sqlalchemy", "elasticsearch", and "djangoorm"""""
    pass

if  config['backend'] == 'sqlalchemy':
    from sqlalchemywrapper.sqlalchemywrapper import SqlAlchemyWrapper as Backend
elif config['backend'] == 'elasticsearch':
    from elasticsearchwrapper import ElasticSearchWrapper as Backend
elif config['backend'] == 'djangoorm':
    from djangoormwrapper import DjangoOrmWrapper as Backend
else:
    raise BackendNotRecognizedException

from spicedham.config import config

from sqlalchemywrapper import SqlAlchemyWrapper
#from elasticsearchwrapper import ElasticSearchWrapper
#from djangoormwrapper import DjangoOrmWrapper


class BackendNotRecognizedException(Exception):
    """Possible backends are "sqlalchemy", "elasticsearch", and "djangoorm"""""
    pass

if  config['backend'] == 'sqlalchemy':
    Backend = SqlAlchemyWrapper()
elif config['backend'] == 'elasticsearch':
    Backend = ElasticSearchWrapper()
elif config['backend'] == 'djangoorm':
    Backend = DjangoOrmWrapper()
else:
    raise BackendNotRecognizedException

Fix imports and duck typing
Fix imports and duck typing

* Always import all backends
* Only assign the right one to Backend based off the config
* Fix the config import

- from config import config
+ from spicedham.config import config
+ 
+ from sqlalchemywrapper import SqlAlchemyWrapper
+ #from elasticsearchwrapper import ElasticSearchWrapper
+ #from djangoormwrapper import DjangoOrmWrapper
+ 
  
  class BackendNotRecognizedException(Exception):
      """Possible backends are "sqlalchemy", "elasticsearch", and "djangoorm"""""
      pass
  
  if  config['backend'] == 'sqlalchemy':
-     from sqlalchemywrapper.sqlalchemywrapper import SqlAlchemyWrapper as Backend
+     Backend = SqlAlchemyWrapper()
  elif config['backend'] == 'elasticsearch':
-     from elasticsearchwrapper import ElasticSearchWrapper as Backend
+     Backend = ElasticSearchWrapper()
  elif config['backend'] == 'djangoorm':
-     from djangoormwrapper import DjangoOrmWrapper as Backend
+     Backend = DjangoOrmWrapper()
  else:
      raise BackendNotRecognizedException
  
Fix imports and duck typing
## Code Before:
from config import config

class BackendNotRecognizedException(Exception):
    """Possible backends are "sqlalchemy", "elasticsearch", and "djangoorm"""""
    pass

if  config['backend'] == 'sqlalchemy':
    from sqlalchemywrapper.sqlalchemywrapper import SqlAlchemyWrapper as Backend
elif config['backend'] == 'elasticsearch':
    from elasticsearchwrapper import ElasticSearchWrapper as Backend
elif config['backend'] == 'djangoorm':
    from djangoormwrapper import DjangoOrmWrapper as Backend
else:
    raise BackendNotRecognizedException

## Instruction:
Fix imports and duck typing
## Code After:
from spicedham.config import config

from sqlalchemywrapper import SqlAlchemyWrapper
#from elasticsearchwrapper import ElasticSearchWrapper
#from djangoormwrapper import DjangoOrmWrapper


class BackendNotRecognizedException(Exception):
    """Possible backends are "sqlalchemy", "elasticsearch", and "djangoorm"""""
    pass

if  config['backend'] == 'sqlalchemy':
    Backend = SqlAlchemyWrapper()
elif config['backend'] == 'elasticsearch':
    Backend = ElasticSearchWrapper()
elif config['backend'] == 'djangoorm':
    Backend = DjangoOrmWrapper()
else:
    raise BackendNotRecognizedException
