pysnap package

PySnap package.

Subpackages

Submodules

pysnap.docview module

Helpers for opening bundled HTML documentation.

pysnap.docview.documentation_index_path()[source]

Return the bundled documentation index page path.

The installed wheel stores compiled HTML files inside pysnap/docs. During development, PySnap also accepts the Sphinx build directory under docs/_build/html as a fallback.

Returns:

Path to the index.html entry point.

Raises:

PySnapError – If no compiled HTML documentation is available.

Return type:

Path

pysnap.docview.open_bundled_documentation(browser=None)[source]

Launch a browser that opens the bundled HTML documentation.

Parameters:

browser (str | None) – Optional browser executable. When omitted, firefox is used.

Returns:

Path to the opened documentation index page.

Raises:

PySnapError – If the documentation or browser executable is unavailable.

Return type:

Path

pysnap.errors module

Custom exceptions used by PySnap.

exception pysnap.errors.PySnapError[source]

Bases: Exception

Base exception for application-level failures.

exception pysnap.errors.CommandExecutionError(command, stdout, stderr)[source]

Bases: PySnapError

Represent a failed VBoxManage command execution.

Parameters:
  • command (list[str])

  • stdout (str)

  • stderr (str)

Return type:

None

exception pysnap.errors.VMNotFoundError(vm_name)[source]

Bases: PySnapError

Report that a requested virtual machine does not exist.

Parameters:

vm_name (str)

Return type:

None

exception pysnap.errors.VMDependencyError(subject, dependents)[source]

Bases: PySnapError

Report that a VM cannot be deleted because dependent clones exist.

Parameters:
  • subject (str)

  • dependents (list[str])

Return type:

None

exception pysnap.errors.ReportFormatError[source]

Bases: PySnapError

Report that a file cannot be read as a report session archive.