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.6.0.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43ee22d2133637f5ba0298048df052609b2a3eef6d4da6b786975789e965cef6 |
|
MD5 | d8fc250f6e511b6a4bb82f812ce3a4e6 |
|
BLAKE2b-256 | 4bea7b5e838f49c81e6e8824e0d58d86ba906dcffae7dc87deb8e409352c4e84 |
Close
Hashes for pyflowlauncher-0.6.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f54a5398d9fd67fe5ff173cc62c2287f01c5af53e4bc44c626e3d5853325f921 |
|
MD5 | 69e82168c7e093003c76e077e729e303 |
|
BLAKE2b-256 | 0e2863c44f4081cd0a3e2d19279cb4a224ee44eadf57cc3c6eb248c57e1140cc |