IndexedRedis.compat_str
index

# Copyright (c) 2014, 2015, 2016, 2017 Timothy Savannah under LGPL version 2.1. See LICENSE for more information.
#
# IRQueryableList - QueryableList with some added callbacks to IndexedRedis
#

 
Modules
       
sys

 
Functions
       
getDefaultIREncoding()
getDefaultIREncoding - Get the default encoding that IndexedRedis will use for all field data.
  You can override this on a per-field basis by using an IRField (such as IRUnicodeField or IRRawField)
 
  @return <str> - Default encoding string
setDefaultIREncoding(encoding)
setDefaultIREncoding - Sets the default encoding used by IndexedRedis.
  This will be the default encoding used for field data. You can override this on a
  per-field basis by using an IRField (such as IRUnicodeField or IRRawField)
 
@param encoding - An encoding (like utf-8)
to_unicode(x, encoding=None)
to_unicode - Ensure a given value is decoded into unicode type (str on python3)
 
@param x - Value
@param encoding <None/str> (default None) - None to use defaultIREncoding, otherwise an explicit encoding
 
@return - "x" as a unicode (str on python3) type
tobytes(x, encoding=None)
tobytes - Ensure that a given value is encoded into bytes
 
@param x - Value
@param encoding <None/str> (default None) - None to use defaultIREncoding, otherwise an explicit encoding
 
@return - "x" as a bytes type

 
Data
        __all__ = ('defaultIREncoding', 'to_unicode', 'tobytes', 'setDefaultIREncoding', 'getDefaultIREncoding')
defaultIREncoding = 'utf-8'