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.5.0.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ea08289a3404f3bc1b6a64021c73410c665c132eadc8ed453033b209b254475 |
|
MD5 | 7c31b8d0b914872e9697282446bc9f41 |
|
BLAKE2b-256 | 787006486d1b0f912468385adf6e88b27141dc0feb4594d9848fe186c67b58a0 |
Close
Hashes for pyflowlauncher-0.5.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36da362293580e1f2555ecd52e51c4dcb8643352bb37fcb204d6d97bfc29eec6 |
|
MD5 | 90f2e8a2fabd79c18dee1781b8ceaf9b |
|
BLAKE2b-256 | fa0660f205da810553442e4f2e9a76e880bff7f36a4d04a2afcd2ceee3d44898 |