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.1.dev0.tar.gz
(10.9 kB
view hashes)
Built Distribution
Close
Hashes for pyflowlauncher-0.7.1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6adf0957096219f0ae31103357c88297334146275e5e60b968525756218ab199 |
|
MD5 | be708522307fce8a36fb490818ba5ee1 |
|
BLAKE2b-256 | 887962afec18ca06a327d83c1e1dd5ac9d0f002ab9e1fb3b0e8d04a3853573a9 |
Close
Hashes for pyflowlauncher-0.7.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10c63daf5a8755069a435102376125f3c5af5d0505c072b7ac261ae0364396db |
|
MD5 | 8c8fc1ef82ce3dd24b63ac77b3cc5620 |
|
BLAKE2b-256 | d41c882c761fe27eff5577cd3e6fcd19f8fdcc5e6e1b91393e424c3fa681d9cb |