Skip to main content

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


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.78.tar.gz (69.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wox_plugin-0.0.78-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file wox_plugin-0.0.78.tar.gz.

File metadata

  • Download URL: wox_plugin-0.0.78.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

Hashes for wox_plugin-0.0.78.tar.gz
Algorithm Hash digest
SHA256 102e59d9a1c0b516eedae9b4d2699a0ea49424ac6059e24b4027d8335c84f8bc
MD5 52bcc355b422a3cc601b02cfc3e523d9
BLAKE2b-256 3a8536bb19d82eef546b00b729883f2736f794988599d5cab38060633e7c9a32

See more details on using hashes here.

File details

Details for the file wox_plugin-0.0.78-py3-none-any.whl.

File metadata

  • Download URL: wox_plugin-0.0.78-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

Hashes for wox_plugin-0.0.78-py3-none-any.whl
Algorithm Hash digest
SHA256 dcafaa85779a83c792011a699b18ffc488d8c0e0f61354dcf4f2e1a2889830de
MD5 e876246c97e4db5c041dcc5ce35f5399
BLAKE2b-256 dcb8e109d6da3a189c4c2aa81ad8385aec85cdfa71caac386c41d205b6fd2f28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page