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.1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b240dc51f25813cea80bb5220a7468412e83d62c0fd2f5f0ee1b13d714b26494 |
|
MD5 | dd507b5b247fb13fd53ea3a5615ed817 |
|
BLAKE2b-256 | d90274502d4aa12aeae74d4b28ed39c17c2881224836de72630eb25fc97410e4 |
Close
Hashes for pyflowlauncher-0.5.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d3b4091c9f9adf79d35bd31d8494b608beefa4bc5ac43258829dd468ff640b0 |
|
MD5 | 86701d3dd4d1e7b327c0983255bbba11 |
|
BLAKE2b-256 | bda2663b1b744e228611bc3bf91d0ec09e88aba8f93c6b346d50d7905ac60063 |