A large class of statistical models in high energy physics can be expressed a simultaneous measurement of binned observables. A popular framework for such binned analysis is HistFactory. So far the only implementation of the model has been within the ROOT ecosystem, limiting adoption and extensibility. We present a complete and extensible implementation of the HistFactory class of models in python, based on multi-dimensional multiarray (tensor) computations. The implementation allows for a variety of tensor backends, such as numpy, TensorFlow, PyTorch and Dask. Through the latter, likelihoods are expressed as computational graphs suitable for automatic differentiation and hardware-accelerated (e.g. GPU and TPU-based) or distributed computation. We present benchmarks showing significant performance gains compared to the existing implementation. Further the implementation introduces a new serialization format for binned likelihoods suitable for archiving on community repositories such as HepData, providing an attractive interface for reinterpretation of physics analyses.