Python library to help build Flow Launcher plugins.
Project description
Installation
Install via pip:
python -m pip install pyflowlauncher
Usage
Basic plugin
A basic plugin using a function as the query method.
from pyflowlauncher import Plugin, Result, send_results
from pyflowlauncher.result import ResultResponse
plugin = Plugin()
@plugin.on_method
def query(query: str) -> ResultResponse:
r = Result(
Title="This is a title!",
SubTitle="This is the subtitle!",
IcoPath="icon.png"
)
return send_results([r])
plugin.run()
Advanced plugin
A more advanced usage using a Method
class as the query method.
from pyflowlauncher import Plugin, Result, Method
from pyflowlauncher.result import ResultResponse
plugin = Plugin()
class Query(Method):
def __call__(self, query: str) -> ResultResponse:
r = Result(
Title="This is a title!",
SubTitle="This is the subtitle!"
)
self.add_result(r)
return self.return_results()
plugin.add_method(Query())
plugin.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pyflowlauncher-0.4.0.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15a62808aa849e176b5ae458932dcbd22f88668c37f6ca5d4e73c75243b54fe3 |
|
MD5 | a01dd910f8129d3cb1633a5416bd52d3 |
|
BLAKE2b-256 | 25f128b2b6e97d3ae60657f5e473cddecff750634217d1ea2460f5eb1cffb9d1 |
Close
Hashes for pyflowlauncher-0.4.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02b4b79cab2e16e6cfdf782afd2b3a150288fe091070fdd9af54c20e936dbdc5 |
|
MD5 | fdd68ddce2276bfdb7d050971f1c7929 |
|
BLAKE2b-256 | 842c49813231a7d3454b96c907cc4aeaa38c0711e8cc1095aa2ab7b3a3343c27 |