Python plugin SDK for Wox launcher
Project description
Wox Plugin Python
This package provides type definitions for developing Wox plugins in Python.
Requirements
- Python >= 3.8 (defined in
pyproject.toml) - Python 3.12 recommended for development (defined in
.python-version)
Installation
# Using pip
pip install wox-plugin
# Using uv (recommended)
uv add wox-plugin
Usage
from wox_plugin import BasePlugin, Query, Result, Context, PluginInitParams
class MyPlugin(BasePlugin):
async def init(self, ctx: Context, params: PluginInitParams) -> None:
self.api = params.API
async def query(self, ctx: Context, query: Query) -> list[Result]:
# Your plugin logic here
results = []
results.append(
Result(
title="Hello Wox",
subtitle="This is a sample result",
icon="path/to/icon.png",
score=100
)
)
return results
# MUST HAVE! The plugin class will be automatically loaded by Wox
plugin = MyPlugin()
Query Requirements
Plugins can declare settings that must be configured before Wox calls query():
{
"QueryRequirements": {
"AnyQuery": [
{
"SettingKey": "apiKey",
"Validators": [{ "Type": "not_empty" }],
"Message": "i18n:my_plugin_api_key_required"
}
],
"QueryWithoutCommand": [],
"QueryWithCommand": {
"download": [
{
"SettingKey": "downloadPath",
"Validators": [{ "Type": "not_empty" }]
}
]
}
}
}
License
MIT
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
wox_plugin-0.0.77.tar.gz
(69.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wox_plugin-0.0.77.tar.gz.
File metadata
- Download URL: wox_plugin-0.0.77.tar.gz
- Upload date:
- Size: 69.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fe08b74cbf75d4f80f60ef0a1af7cd2039416db2be837baa1345246615843cb
|
|
| MD5 |
114fdb0a5a993e37854a29a651e85a43
|
|
| BLAKE2b-256 |
4178a871aa43e4d7b0fd7744354952c04c5ccb2b6526e72b8630edc96305fd6b
|
File details
Details for the file wox_plugin-0.0.77-py3-none-any.whl.
File metadata
- Download URL: wox_plugin-0.0.77-py3-none-any.whl
- Upload date:
- Size: 50.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c754d542d23da7c76b41350a96fe6f8052bd639478f61598362891e0100e0ae2
|
|
| MD5 |
686fc593bc29792eaf3035778ac549d3
|
|
| BLAKE2b-256 |
10a12b3b1bbf9f58a691b8b4b068474a88afa4da165e7d4a18b7ec8e38233889
|