A python analysis framework for high energy physics