ArchivedSource

class ArchivedSource(path: Path, archive_type: Literal['tar', 'zip'], inner_path: str | PurePath)[source]

Bases: Source

A source for a file inside an archive.

Attributes Summary

archive_type

inner_path

path

The local path where the resource is stored on disk.

Methods Summary

open()

Open the file from within a zip or tar archive.

Attributes Documentation

Parameters:
archive_type: Literal['tar', 'zip'] = <dataclasses._MISSING_TYPE object>
inner_path: str | PurePath = <dataclasses._MISSING_TYPE object>
path: Path = <dataclasses._MISSING_TYPE object>

The local path where the resource is stored on disk.

Methods Documentation

open() → Generator[IO[str]][source]

Open the file from within a zip or tar archive.

Return type:

Generator[IO[str]]