hive related python code