code: def get_by(cls, field, value):
          ''' Tries to retrieve an isinstance of this model from the database
          given a value for a defined index. Return None in case of failure '''
          redis = cls.get_redis()
          key = cls.cls_key()+':index_'+field
  
          id = redis.hget(key, value)
  
          if id:
              return cls.get(debyte_string(id))
  
          return Nonf get_by(cls, field, value):
          ''' Tries to retrieve an isinstance of this model from the database
          given a value for a defined index. Return None in case of failure '''
          redis = cls.get_redis()
          key = cls.cls_key()+':index_'+field
  
          id = redis.hget(key, value)
  
          if id:
              return cls.get(debyte_string(id))
  
          return None
docs: Tries to retrieve an isinstance of this model from the database
          given a value for a defined index. Return None in case of failure