Skip to main content

A plugin-based microframework for highly reusable applications and their components

Project description

groundwork is a Python based microframework for highly reusable applications and their components.

Its functionality is based on exchangeable, documented and tested plugins and patterns.

It is designed to support any kind of Python application: command line scripts, desktop programs or web applications.

groundwork enables applications to activate and deactivate plugins during runtime and to control dynamic plugin behaviors like plugin status, used signals, registered commands and much more.

The functionality of plugins can easily be extended by the usage of inheritable patterns. Thus, groundwork supports developers with time-saving solutions for:

  • Command line interfaces

  • Loose inter-plugin communication via signals and receivers

  • Shared objects to provide and request content to and from other plugins

  • Static and dynamic documents for an overall documentation

Example

The following code defines a plugin with command line support and creates a groundwork application which activates the plugin:

from groundwork import App
from groundwork.patterns import GwCommandsPattern

class MyPlugin(GwCommandsPattern):
    def _init_(self, *args, **kwargs):
        self.name = "My Plugin"
        super().__init__(*args, **kwargs)

    def activate(self):
        self.commands.register(command='hello',
                               description='prints "hello world"',
                               function=self.greetings)

    def greetings(self):
        print("Hello world")

if __name__ == "__main__":
    my_app = App(plugins=[MyPlugin])        # Creates app and registers MyPlugin
    my_app.plugins.activate(["My Plugin"])  # Initialise and activates 'My Plugin'
    my_app.commands.start_cli()             # Starts the command line interface

The following commands can be used on a command line now:

python my_app.py hello      # Prints 'Hello world'
python my_app.py            # Prints a list of available commands
python my_app.yp hello -h   # Prints syntax help for the hello command

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

groundwork-0.1.4.tar.gz (108.5 kB view details)

Uploaded Source

Built Distributions

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

groundwork-0.1.4-py3.4.egg (196.2 kB view details)

Uploaded Egg

groundwork-0.1.4-py3-none-any.whl (130.6 kB view details)

Uploaded Python 3

File details

Details for the file groundwork-0.1.4.tar.gz.

File metadata

  • Download URL: groundwork-0.1.4.tar.gz
  • Upload date:
  • Size: 108.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for groundwork-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a7d4fd29768d7c9489aa39800cb60eed64de1c44e275692f69ad67062e34a23d
MD5 8e66a5f28ef5119bd3451c4fb5b71899
BLAKE2b-256 f8c4e043065a8b633917341278300af16073a526e9758ec86af44e5fc28df00c

See more details on using hashes here.

File details

Details for the file groundwork-0.1.4-py3.4.egg.

File metadata

  • Download URL: groundwork-0.1.4-py3.4.egg
  • Upload date:
  • Size: 196.2 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for groundwork-0.1.4-py3.4.egg
Algorithm Hash digest
SHA256 ed5ee8f2b838b67924d177a3c398c2e8ecc38b120c5f2fcd6c0a4c56d9aff4a2
MD5 a6144631dd31e68d2dae69eaf394e63c
BLAKE2b-256 6d60d150e309e46da338902f19e10cf408db5a3e8ef57cb2c4d64f99d045cfc1

See more details on using hashes here.

File details

Details for the file groundwork-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for groundwork-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a013e235461916efda7d195b457704fed547f446902d23eddeb48f53f16f2d97
MD5 653c6d5d50b75423a53676dd5b89dcfd
BLAKE2b-256 35d48d122f81bd20ac8d6bc458314ab8cbfa7f43022684e9a4f9bbfedd1f8f27

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