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.3.dev0.tar.gz
(10.9 kB
view hashes)
Built Distribution
Close
Hashes for pyflowlauncher-0.8.3.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3390b0d26f3fa85cdb8eda685c1dc8b9f00f93c1cbab7583d7736796984c928d |
|
MD5 | 0f9de6e336e552621bd228b95e015412 |
|
BLAKE2b-256 | 700aea4e1ce2be76a0e843a5b18cb51933075842a4c2115b1b522cbf18dd41ac |
Close
Hashes for pyflowlauncher-0.8.3.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d648ff4328d6bed2148243dad42d7c77e0795880a845ec291b85ac28ee552527 |
|
MD5 | 58edda317e1c153faa34f00e07d9c80a |
|
BLAKE2b-256 | 3744da7ea29a01a608b0b2844b55c264c0b6671546cf7520c96aefd1ceb1ccf5 |