$ brew install thrift
$ yum install thrift
$ cd /Volumes/Files-Pics-Vids/Files/Files/Hazem/Professional/Career/Cloudera/Development/Git/Projects/
$ mkdir HBaseThrift
$ cd HBaseThrift/
To generate the bindings for Python, use the HBase IDL (Interface Definition Language). Target language libraries for C++, Java, Ruby, PHP, (and more) are generated by running this file through the Thrift compiler with the appropriate flags. This will create a dir ‘gen-py/hbase’ that will have the Python libraries used by all your Python code as it interacts with HBase
$ thrift -gen py /Volumes/Files-Pics-Vids/Files/Files/Hazem/Professional/Career/Cloudera/Development/Git/Projects/hbase/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
thrift -gen py /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/apps/hbase/thrift/Hbase.thrift
$ cp /Volumes/Files-Pics-Vids/Files/Files/Hazem/Professional/Career/Cloudera/Development/Git/Projects/hbase/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift .
$ mv gen-py/* .
$ rm -rf gen-py/
get the Thrift code for the language (Python) that contains all the classes for connection to Thrift and its protocols. This code can be found at /path/to/thrift/thrift-0.9.0/lib/py/src/.
$ wget http://archive.apache.org/dist/thrift/0.12.0/thrift-0.12.0.tar.gz
$ tar -xzf thrift-0.12.0.tar.gz
$ mkdir thrift
$ cp -rp thrift-0.12.0/lib/py/src/* ./thrift/
pip3 install hbase-thrift
https://blog.cloudera.com/how-to-use-the-hbase-thrift-interface-part-1/