I have struggled for awhile with a simple and straightforward driver that I can use to connect to Hive Server 2 in a very similar manner as a mysql driver in python. I know there are a few ways like using thrift or ODBC but all require significant amount of installation. I decided to create my own package that includes all the required packages such as SASL and Thrift wrappers to connect. It is called pyhs2 and is avaliable here:
conn = pyhs2.connect(host='localhost',
cur = conn.cursor()
for i in cur.fetch():
Feel free to use it, I plan to add additional functionality and fix any bugs that exist. Most of the code was repurposed from a variety of sources. I hope you find it useful, please let me know if you have any questions.