Python library to help build Flow Launcher plugins.
Project description
PyFlowLauncher
PyFlowLauncher is an API that allows you to quickly create plugins for Flow Launcher!
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.6.1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0c7c3764f8d5525f048954bce0c22c4801a88e6dae00dd7fa6bbd7d712ef545 |
|
MD5 | 3d5fe6d2e69ddd0c9f4989a31fc639ec |
|
BLAKE2b-256 | 2d9b090e19f7dfed9ab465c86e0643074dad179b9e3254437f1db00da4aeb6c7 |
Close
Hashes for pyflowlauncher-0.6.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82f25c139eab2778e1ccf10fdc7b3bbde862298fffd5b1eb794a23b21cb0fe3d |
|
MD5 | 5c1e1a2ba786bd0862769dc78d8eb816 |
|
BLAKE2b-256 | c5ffe9b894d27ce62d2d1159d56f00730853263ec96ac04d78e6f24cac69100f |