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.9.2.tar.gz
(11.2 kB
view details)
Built Distribution
File details
Details for the file pyflowlauncher-0.9.2.tar.gz
.
File metadata
- Download URL: pyflowlauncher-0.9.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7253955072f938c0a09e70b660e25b747fbc2995417756819e2f100675ff7887 |
|
MD5 | 4e7c5081231c0eddc02ca724eb57cbb2 |
|
BLAKE2b-256 | 92f1ecba8cb989a90635e51829617111c9fb0c20c15a658ee96cc2fec90d2df9 |
File details
Details for the file pyflowlauncher-0.9.2-py3-none-any.whl
.
File metadata
- Download URL: pyflowlauncher-0.9.2-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 595f11a6f31f8adad1389a3e4c049badaf0d99dd27a447391c6fc0abbc62cca0 |
|
MD5 | f98b929d844448d4f1205c958e8ee164 |
|
BLAKE2b-256 | 95a69aead5f71f74a1881b67c450871b91241a1f1ab608c3abd1370ea6423742 |