Creating and Performing TransfersΒΆ

Builder provides a transfers button similar to a web browser. It should feel familiar to users of Nautilus (Files) and Epiphany (Web).


To integrate with the transfers button, you need to create a subclass of Ide.Transfer and add it to the Ide.TransferManager.

Builder provides a convenience transfer class called Ide.PkconTransfer which can be used to install packages on the host machine.


import gi

from gi.repository import GObject
from gi.repository import Gio
from gi.repository import Ide

class MyTransfer(Ide.Transfer):
    def do_execute_async(self, cancellable, callback, data):
        task =, cancellable, callback)

        # ... perform transfer asynchronously, and update
        # progress from the main thread occasionally, using
        # self.set_progress(0..1)


        # When finished, complete the task

        # Unless there was a failure, return the error

    def do_execute_finish(self, task):
        return task.propagate_boolean()

# From your other plugin code, get the transfer manager and
# queue the transfer.

app = Gio.Application.get_default()
xfermgr = app.get_transfer_manager()

xfer = MyTransfer(title='Downloading Foo')
xfermgr.execute_async(xfer, None, None, None)