Skip to content

Latest commit

 

History

History
90 lines (64 loc) · 2.13 KB

File metadata and controls

90 lines (64 loc) · 2.13 KB

Mutablezip

Mutablezip Index / Mutablezip

Auto-generated documentation for mutablezip module.

MutableZipFile

Show source in init.py:14

Add delete (via remove_file) and update (via writestr and write methods) To enable update features use MutableZipFile with the 'with statement', Upon exit (if updates were applied) a new zip file will override the exiting one with the updates.

Signature

class MutableZipFile(ZipFile):
    def __init__(
        self,
        file: str | IO[bytes],
        mode: Literal["r", "w", "x", "a"] = "r",
        compression: int = ZIP_STORED,
        allowZip64: bool = False,
    ) -> None: ...

MutableZipFile()._closeAllTempFiles

Show source in init.py:118

Close all temporary files.

Signature

def _closeAllTempFiles(self) -> None: ...

MutableZipFile().removeFile

Show source in init.py:124

Flag a file with a delete marker.

Signature

def removeFile(self, path: str | PathLike[str]) -> None: ...

MutableZipFile().write

Show source in init.py:73

Signature

def write(
    self,
    filename: str | PathLike[str],
    arcname: str | PathLike[str] | None = None,
    compress_type: int | None = None,
    compresslevel: int | None = None,
) -> None: ...

MutableZipFile().writestr

Show source in init.py:44

Signature

def writestr(
    self,
    zinfo_or_arcname: str | ZipInfo,
    data: bytes | str,
    compress_type: int | None = None,
    compresslevel: int | None = None,
) -> None: ...