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[all]
⚠️ The
[all]
is important if you intend to support Python versions older then3.11
. ⚠️
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
pyflowlauncher-0.7.0.dev0.tar.gz
(11.0 kB
view hashes)
Built Distribution
Close
Hashes for pyflowlauncher-0.7.0.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00da784a3165ca29718f1bb65c3e81f7551fbddb4d5d318f64a74b23ecfb5dca |
|
MD5 | 75b1a741ca32e7e6268e282611c0d97f |
|
BLAKE2b-256 | 6a611a5e0a7d0b6bd7349e6accbc1580be7c661e7b1d3f0a3a349e74b614ec6a |
Close
Hashes for pyflowlauncher-0.7.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5b61d95ee683b6fd3a3e472c794922ea85c83c897d4f9a2748a1e7ac45e3a2f |
|
MD5 | 160a09be8811e07d93a516639ed705e9 |
|
BLAKE2b-256 | c9da94c868d9d2f17caf86c3214aa045c3d2f954764e81cf79c8e58459605006 |