Instance

class Instance(**properties: Any)

Superclasses: Object

Constructors:

Instance(**properties)

Methods

class Instance
get_all() list[Instance]

Gets FlatpakInstance objects for all running sandboxes in the current session.

Added in version 1.1.

get_app() str | None

Gets the application ID of the application running in the instance.

Note that this may return None for sandboxes that don’t have an application.

Added in version 1.1.

get_arch() str

Gets the architecture of the application running in the instance.

Added in version 1.1.

get_branch() str

Gets the branch of the application running in the instance.

Added in version 1.1.

get_child_pid() int

Gets the PID of the application process in the sandbox.

See get_pid().

Note that this function may return 0 immediately after launching a sandbox, for a short amount of time.

Added in version 1.1.

get_commit() str

Gets the commit of the application running in the instance.

Added in version 1.1.

get_id() str

Gets the instance ID. The ID is used by Flatpak for bookkeeping purposes and has no further relevance.

Added in version 1.1.

get_info() 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.

Added in version 1.1.

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 get_child_pid().

Added in version 1.1.

get_runtime() str

Gets the ref of the runtime used in the instance.

Added in version 1.1.

get_runtime_commit() str

Gets the commit of the runtime used in the instance.

Added in version 1.1.

is_running() bool

Finds out if the sandbox represented by self is still running.

Fields

class Instance
parent