sometext = gettextfromsomewhere().decode('utf-8')
env = jinja2.Environment(loader=jinja2.PackageLoader('jinjaapplication',
    'templates'))
template = env.get_template('mypage.html')
Python Requests encoding POST data