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
pyflowlauncher-0.6.2.dev0.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for pyflowlauncher-0.6.2.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f41de37e47c720f2a0e405ae2320cb842c384b10da7f4f8023e0a1f7458902f |
|
MD5 | 44530cf8333f662a727b4ee9912873c5 |
|
BLAKE2b-256 | 87968a1cee32a5a242815b172c554890d8abf8a582f576af744a01726dd3e5bf |
Close
Hashes for pyflowlauncher-0.6.2.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85c6ff64421f982accd44f50bf30734113b1395e82d0e4adc57b63c75f3a4247 |
|
MD5 | 0b7979f726bcc18a5b6d4a04d3a39a62 |
|
BLAKE2b-256 | c8b0d90a0aee74088b636f9cb7c7f028042d36a34c77177d7d0965a6f1614e3e |