muelle.archive
Source: src/muelle/archive.py.
Safe extraction of site artifacts (zip or tar, optionally compressed).
ArchiveError
class ArchiveError(Exception)
check_name
def check_name(name: str) -> None
Rejects member names that could escape the destination.
extract
def extract(
archive: Path,
dest: Path,
*,
max_bytes: int = DEFAULT_MAX_BYTES,
max_files: int = DEFAULT_MAX_FILES,
) -> None
Extracts ARCHIVE into DEST (created), rejecting anything but plain files and dirs.
MAX_BYTES bounds the total uncompressed size, MAX_FILES the number of entries.