Additional utility functions¶
This module provides some utility functions, but these shouldn’t normally be used by external applications.
-
secretstorage.util.
format_secret
(session, secret, content_type)[source]¶ Formats secret to make possible to pass it to the Secret Service API.
-
secretstorage.util.
exec_prompt
(bus, prompt, callback)[source]¶ Executes the given prompt, when complete calls callback function with two arguments: a boolean representing whether the operation was dismissed and a list of unlocked item paths. A main loop should be running and registered for this function to work.
-
secretstorage.util.
exec_prompt_glib
(bus, prompt)[source]¶ Like
exec_prompt()
, but synchronous (uses loop from GLib API). Returns (dismissed, unlocked) tuple.
-
secretstorage.util.
exec_prompt_qt
(bus, prompt)[source]¶ Like
exec_prompt()
, but synchronous (uses loop from PyQt5 API). Returns (dismissed, unlocked) tuple.
-
secretstorage.util.
unlock_objects
(bus, paths, callback=None)[source]¶ Requests unlocking objects specified in paths. If callback is specified, calls it when unlocking is complete (see
exec_prompt()
description for details). Otherwise, uses the loop from GLib API and returns a boolean representing whether the operation was dismissed.New in version 2.1.2.