
Albert Plugin: Python
https://github.com/albertlauncher/albert-plugin-python- Category
- Productivity
- Rank
- No. 1686Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- albertlauncher
- GitHub
- 2 stars
- Date
About
Extend the Albert launcher with Python plugins. Lets you write custom keyword-triggered actions for the cross-platform productivity launcher in pure Python.
What it does
This native Albert extension embeds an isolated Python interpreter, discovers user modules and packages, reads their declared metadata, and turns compatible plugin classes into launcher extensions through a C++ binding layer.
Why it's ranked here
The design handles substantial integration work: interpreter setup, discovery, compatibility checks, dependency validation, loading, unloading, logging, and configuration widgets. Its sparse published documentation makes adoption harder, but the implementation and tests show a serious bridge rather than a thin script runner.
What's good
Each installation gets a managed virtual environment, which isolates Python packages from the wider system. The loader checks binary and Python dependencies before activation, validates interface compatibility and declared platforms, namespaces imported modules to reduce conflicts, and supplies generated type information for editor support.
Tradeoffs
The supplied documentation contains only a heading, so developers must infer the contract from code, stubs, or external material not included here. Plugin metadata must use statically readable assignments. Loading depends on a specific major interface, package installation can occur during activation, and interpreter shutdown is deliberately skipped because it caused crashes.
How to use it well
It suits Albert users comfortable maintaining small Python extensions and declaring their metadata and dependencies precisely. Keep plugins focused, pin expectations to the supported interface, and use the isolated environment for required packages. It does not replace a standalone automation runner, general Python package manager, or launcher-independent plugin framework.
Technical notes+
src/plugin.cpp initializes Python with PyConfig_InitIsolatedConfig, releases the GIL by default, creates a version-specific venv, adds its site-packages, writes albert.pyi, and scans plugin data directories asynchronously. src/pypluginloader.cpp accepts .py files or packages containing __init__.py, parses metadata through Python's AST, enforces interface 5.0 compatibility, checks Darwin, Linux, or Windows declarations, validates executables, installs missing runtime packages, imports modules under an albert. namespace, and runs garbage collection on unload. test/test.cpp exercises bindings, plugin instances, handlers, actions, items, matching, and generated configuration widgets. i18n/python_de.ts, i18n/python_es.ts, i18n/python_fr.ts, i18n/python_it.ts, i18n/python_ja.ts, i18n/python_ko.ts, i18n/python_pt.ts, and i18n/python_zh.ts provide translated interface strings.
Observed
- Primary implementation
- C++ host plugin with Python exposed through pybind11
- Interface
- Albert extension plugin and plugin provider with an embedded Python API
- Plugin install surface
- Discovers individual Python files and Python package directories in Albert plugin data locations
- Dependency environment
- Creates a private Python virtual environment and can install declared runtime packages with pip
- Platform metadata
- Recognizes plugin platform declarations for Darwin, Linux, and Windows
- Tests
- Repository tree includes a C++ Qt test source covering the Python binding surface
Read from README.md, src/plugin.h, src/plugin.cpp, src/pypluginloader.h, src/pypluginloader.cpp, i18n/python_de.ts, i18n/python_en.ts, i18n/python_es.ts, i18n/python_fr.ts, i18n/python_it.ts, i18n/python_ja.ts, i18n/python_ko.ts, i18n/python_pt.ts, i18n/python_zh.ts, test/test.cpp.
What it can do
Execute custom Python scripts through launcher
Python code and keyword trigger → Custom action execution
Create keyword-triggered shortcuts
Custom keywords and Python functions → Launcher shortcuts
Extend launcher functionality with custom commands
Python plugin code → New launcher commands
Process text input through custom Python functions
Text queries and Python processing logic → Processed results
Integrate external APIs through Python plugins
API calls and Python integration code → API response data
Automate system tasks via launcher commands
Python automation scripts and trigger keywords → Executed system operations
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.