Save this package to `pkg_file`. `file` can be either a path to a file (a string) or a file-like object.
(self, pkg_file: str | IO[bytes])
| 149 | raise Exception("ProgrammingError: ran out of candidate_partnames") # pragma: no cover |
| 150 | |
| 151 | def save(self, pkg_file: str | IO[bytes]) -> None: |
| 152 | """Save this package to `pkg_file`. |
| 153 | |
| 154 | `file` can be either a path to a file (a string) or a file-like object. |
| 155 | """ |
| 156 | PackageWriter.write(pkg_file, self._rels, tuple(self.iter_parts())) |
| 157 | |
| 158 | def _load(self) -> Self: |
| 159 | """Return the package after loading all parts and relationships.""" |