Universal library to deal with archive files?

Currently dealing with various archive files such as:

  • .7z
  • .rar
  • .tar
  • .zip

I know there’s individual libraries to work with them such as py7zr, rarfile, tarfile, and zipfile respectively. Before I write my own solution (which I would rather not), I want to know if there’s already a universal library that can let me handle the different archive formats?

My objective is to extract the both the smallest and largest file from any of those archive files.

This: patool · PyPI

or this: extractcode · PyPI ?


Very good to know. Thank you!