:right-sidebar: True Instance =================================================================== .. currentmodule:: gi.repository.Flatpak .. class:: Instance(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` :Constructors: :: Instance(**properties) Methods ------- .. rst-class:: interim-class .. class:: Instance :no-index: .. classmethod:: get_all() -> list[~gi.repository.Flatpak.Instance] Gets FlatpakInstance objects for all running sandboxes in the current session. .. versionadded:: 1.1 .. method:: get_app() -> str | None Gets the application ID of the application running in the instance. Note that this may return :const:`None` for sandboxes that don't have an application. .. versionadded:: 1.1 .. method:: get_arch() -> str Gets the architecture of the application running in the instance. .. versionadded:: 1.1 .. method:: get_branch() -> str Gets the branch of the application running in the instance. .. versionadded:: 1.1 .. method:: get_child_pid() -> int Gets the PID of the application process in the sandbox. See :func:`~gi.repository.Flatpak.Instance.get_pid`. Note that this function may return 0 immediately after launching a sandbox, for a short amount of time. .. versionadded:: 1.1 .. method:: get_commit() -> str Gets the commit of the application running in the instance. .. versionadded:: 1.1 .. method:: get_id() -> str Gets the instance ID. The ID is used by Flatpak for bookkeeping purposes and has no further relevance. .. versionadded:: 1.1 .. method:: get_info() -> ~gi.repository.GLib.KeyFile Gets a keyfile that holds information about the running sandbox. This file is available as /.flatpak-info inside the sandbox as well. The most important data in the keyfile is available with separate getters, but there may be more information in the keyfile. .. versionadded:: 1.1 .. method:: get_pid() -> int Gets the PID of the outermost process in the sandbox. This is not the application process itself, but a bubblewrap 'babysitter' process. See :func:`~gi.repository.Flatpak.Instance.get_child_pid`. .. versionadded:: 1.1 .. method:: get_runtime() -> str Gets the ref of the runtime used in the instance. .. versionadded:: 1.1 .. method:: get_runtime_commit() -> str Gets the commit of the runtime used in the instance. .. versionadded:: 1.1 .. method:: is_running() -> bool Finds out if the sandbox represented by ``self`` is still running. Fields ------ .. rst-class:: interim-class .. class:: Instance :no-index: .. attribute:: parent