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]
[!IMPORTANT] Please use the
[all]
flag in order 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.8.2.dev0.tar.gz
(10.9 kB
view hashes)
Built Distribution
Close
Hashes for pyflowlauncher-0.8.2.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e3bd4c22ee90afc83047e5a18ceb74c70e9d25cdcdb1c668c0eb508329939e6 |
|
MD5 | 5f196e432435b30327c53a4a570de28f |
|
BLAKE2b-256 | d1c1170a62bf173b1c0a1b8f7c5b9c463ff289f680d7c424da7e5d536f08816a |
Close
Hashes for pyflowlauncher-0.8.2.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72ddfc5da3c0801c8c73d29ed55616a9c83aa7d269057998661392d7c5b41de2 |
|
MD5 | 9dfb120e40533641987767a0d8167fd0 |
|
BLAKE2b-256 | db41203580a2d5b14e4d87dfcf0d486c13eaa0ac714c22191a9d2c4dbb74b044 |