result
Attributes
Classes
MethodNotRegisteredError
Bases: Exception
Exception raised when trying to add an action with a method that is not registered as a plugin method.
Source code in pyflowlauncher/result.py
12 13 14 15 16 17 18 19 20 | |
Attributes
method
instance-attribute
method = method
Functions
__init__
__init__(method: Callable[..., Any])
Source code in pyflowlauncher/result.py
15 16 17 18 19 20 | |
Result
dataclass
Source code in pyflowlauncher/result.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
Attributes
auto_complete_text
class-attribute
instance-attribute
auto_complete_text: Optional[str] = None
context_data
class-attribute
instance-attribute
context_data: Optional[Iterable] = None
copy_text
class-attribute
instance-attribute
copy_text: Optional[str] = None
glyph
class-attribute
instance-attribute
glyph: Optional[Glyph] = None
icon
class-attribute
instance-attribute
icon: Optional[Union[str, Path]] = None
json_rpc_action
class-attribute
instance-attribute
json_rpc_action: Optional[JsonRPCRequest] = None
preview
class-attribute
instance-attribute
preview: Optional[PreviewInfo] = None
rounded_icon
class-attribute
instance-attribute
rounded_icon: bool = False
score
class-attribute
instance-attribute
score: int = 0
subtitle
class-attribute
instance-attribute
subtitle: Optional[str] = None
title
instance-attribute
title: str
title_highlight_data
class-attribute
instance-attribute
title_highlight_data: Optional[List[int]] = None
Functions
__init__
__init__(title: str, subtitle: Optional[str] = None, icon: Optional[Union[str, Path]] = None, score: int = 0, json_rpc_action: Optional[JsonRPCRequest] = None, context_data: Optional[Iterable] = None, glyph: Optional[Glyph] = None, copy_text: Optional[str] = None, auto_complete_text: Optional[str] = None, rounded_icon: bool = False, preview: Optional[PreviewInfo] = None, title_highlight_data: Optional[List[int]] = None) -> None
add_action
add_action(method: Method, parameters: Optional[Iterable[Any]] = None, dont_hide_after_action: bool = False) -> None
Adds a JsonRPC action to the result.
Source code in pyflowlauncher/result.py
38 39 40 41 42 43 44 45 46 47 48 | |
as_dict
as_dict() -> Dict[str, Any]
Source code in pyflowlauncher/result.py
50 51 | |
from_json
staticmethod
from_json(json_result: JsonRPCResult) -> Result
Creates a Result instance from a JsonRPCResult dictionary.
Source code in pyflowlauncher/result.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | |
to_json
to_json() -> JsonRPCResult
Converts the Result instance to a JsonRPCResult dictionary
Source code in pyflowlauncher/result.py
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
Functions
send_results
send_results(results: Iterable[Result], settings: Optional[Dict[str, Any]] = None) -> JsonRPCResponse
Formats and returns results as a JsonRPCResponse
Source code in pyflowlauncher/result.py
91 92 93 | |