Skip to main content

GUI for Yapsy plugin system

Project description

Yapsy QT GUI

Python plugin manager

This project is a GUI python plugin manager. Backend is implemented over Yapsy

Basic plugin structure:

plugin1.plugin
# Plugin descriptor file
[Core]
Name = Plugin Test
Module = plugin1

[Documentation]
Author = Leonel Hernandez
Version = 0.1
Website = https://github.com/leonelhs/
Description = This is a demo plugin
plugin1.py
# Plugin module file
from qtpy.QtWidgets import QPushButton
from yapsy.IPlugin import IPlugin


class PluginOne(IPlugin):

    def __init__(self):
        super().__init__()
        self.context = None
        self.name = "Plugin test-01"

    def action(self, context):
        self.context = context
        button = QPushButton(self.name)
        button.clicked.connect(self.task)
        context.layout().addWidget(button)

    def task(self):
        self.context.output.append("This is a text from plugin test-01")

Minimal Application

import sys
from qtpy import QtWidgets
from qtpy.QtWidgets import QWidget, QVBoxLayout, QPushButton, QTextBrowser
from yapsygui import DialogPlugins


def fetchPlugins(plugins):
    for plugin in plugins:
        plugin.plugin_object.action(win)


app = QtWidgets.QApplication()
win = QWidget(None)
win.setLayout(QVBoxLayout())
btn_manager = QPushButton("Show Manager")
win.layout().addWidget(btn_manager)

manager = DialogPlugins("./plugins")
manager.connect(fetchPlugins)
manager.loadPlugins()

btn_manager.clicked.connect(manager.show)
win.output = QTextBrowser(win)
win.layout().addWidget(win.output)

win.show()
sys.exit(app.exec_())

Install

foo@bar:~$ pip install yapsygui
foo@bar:~$ yapsygui

For install a new plugin just locate plugin descriptor

Test plugin action

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

yapsygui-1.1.2-py3.11.egg (38.0 kB view details)

Uploaded Source

yapsygui-1.1.2-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file yapsygui-1.1.2-py3.11.egg.

File metadata

  • Download URL: yapsygui-1.1.2-py3.11.egg
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for yapsygui-1.1.2-py3.11.egg
Algorithm Hash digest
SHA256 f8b7cd3e0257ce7a3b0e9b76a18b7d8ecf109f267696635972bc794483035012
MD5 dab1b13baebc76858d009a5a6957163f
BLAKE2b-256 125a071e51a45e80f0b280ca2692fa73963c10d0b5fece2d919f7e61a730c30f

See more details on using hashes here.

File details

Details for the file yapsygui-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: yapsygui-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for yapsygui-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d0ebe243c4c060852726c2b0362ef673023f24045e061b1f5b3a89cbac9d6b7
MD5 310811dc5ce45188e008fe6d676f8cfd
BLAKE2b-256 2595b10e13cdf94f1c21049c9e14fc8fe9254e57cc41e40304a09cc94744b4e6

See more details on using hashes here.

Supported by

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