Flatpak.Instance

g Flatpak.Instance Flatpak.Instance GObject.Object GObject.Object GObject.Object->Flatpak.Instance

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_all ()

get_app ()

get_arch ()

get_branch ()

get_child_pid ()

get_commit ()

get_id ()

get_info ()

get_pid ()

get_runtime ()

get_runtime_commit ()

is_running ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Flatpak.Instance(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Flatpak.InstanceClass

classmethod get_all()
Returns:

a GLib.PtrArray of Flatpak.Instance objects

Return type:

[Flatpak.Instance]

Gets Flatpak.Instance objects for all running sandboxes in the current session.

New in version 1.1.

get_app()
Returns:

the application ID or None

Return type:

str or 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.

New in version 1.1.

get_arch()
Returns:

the architecture

Return type:

str

Gets the architecture of the application running in the instance.

New in version 1.1.

get_branch()
Returns:

the architecture

Return type:

str

Gets the branch of the application running in the instance.

New in version 1.1.

get_child_pid()
Returns:

the application process PID

Return type:

int

Gets the PID of the application process in the sandbox.

See Flatpak.Instance.get_pid().

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

New in version 1.1.

get_commit()
Returns:

the commit

Return type:

str

Gets the commit of the application running in the instance.

New in version 1.1.

get_id()
Returns:

the instance ID

Return type:

str

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

New in version 1.1.

get_info()
Returns:

the flatpak-info keyfile

Return type:

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.

New in version 1.1.

get_pid()
Returns:

the outermost process PID

Return type:

int

Gets the PID of the outermost process in the sandbox. This is not the application process itself, but a bubblewrap ‘babysitter’ process.

See Flatpak.Instance.get_child_pid().

New in version 1.1.

get_runtime()
Returns:

the runtime ref

Return type:

str

Gets the ref of the runtime used in the instance.

New in version 1.1.

get_runtime_commit()
Returns:

the runtime commit

Return type:

str

Gets the commit of the runtime used in the instance.

New in version 1.1.

is_running()
Returns:

True if the sandbox is still running

Return type:

bool

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