get_cached_reader#

barecat.get_cached_reader(path, auto_codec=None)[source]#

Get a thread-locally cached read-only Barecat reader.

Each thread/process gets its own cached instance. Useful for multi-threaded data loading where each worker needs its own Barecat handle.

Parameters:
  • path – Path to the archive.

  • auto_codec – Whether to automatically decode files based on extension. Currently defaults to True for backwards compatibility, but the default will change to False in version 1.0. Pass True or False explicitly to silence the deprecation warning. Use DecodedView for new code.