def literal_compile(s):
 return str(s.compile(compile_kwargs={'literal_binds': True}))

def literal_compile ( s ) : return str ( s . compile ( compile_kwargs = { 'literal_binds' : True } ) )
compile a sql expression with bind params inlined as literals .