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.11.tar.gz (110.3 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.11-py3.5.egg (196.9 kB view details)

Uploaded Egg

groundwork-0.1.11-py3-none-any.whl (133.1 kB view details)

Uploaded Python 3

groundwork-0.1.11-py2.7.egg (191.7 kB view details)

Uploaded Egg

groundwork-0.1.11-py2-none-any.whl (133.1 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for groundwork-0.1.11.tar.gz
Algorithm Hash digest
SHA256 ebdf0ad1f9eb6c91b7e5cce3ef679abe4f0618bca6a54b7b4a68a14567afb031
MD5 0365ff13aed2de4c57f5838d8bb43be5
BLAKE2b-256 c67d1656b85b7d9bbb61ff289e05e08ebd86e1f00d575e46d8e76ee73cf68437

See more details on using hashes here.

File details

Details for the file groundwork-0.1.11-py3.5.egg.

File metadata

File hashes

Hashes for groundwork-0.1.11-py3.5.egg
Algorithm Hash digest
SHA256 c29c5e516fd0ca4bde87c171e201272742ff4a5ed6f91880464ebf7e0d10ab16
MD5 d35d4b822b517f68fad89be68e981404
BLAKE2b-256 aaecb24499fdb7e638b8a332c6a8c7b8002b5dc92b0fac0b6d180b03171ffdba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for groundwork-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 af2a58ed9a3279e719894496bcca0951143a242d6f85cfc4f16f83bc59123f8d
MD5 902fb96da28900b8fa1817d39ae5fc99
BLAKE2b-256 6ee83ae6a6a535f0ce9e0b470c5556afd184128082bd0e8066cbf0113fdca595

See more details on using hashes here.

File details

Details for the file groundwork-0.1.11-py2.7.egg.

File metadata

File hashes

Hashes for groundwork-0.1.11-py2.7.egg
Algorithm Hash digest
SHA256 5950c6e35b94e19ea0c4bef2ba994df0064f71746b65839dc7dc8a05d48b6c31
MD5 7b134e7a56880ecff34f8e5ecb848796
BLAKE2b-256 241eac394c9178541143dceaf8e6a7d4e908716abb51da801ff83c8cde1f19fe

See more details on using hashes here.

File details

Details for the file groundwork-0.1.11-py2-none-any.whl.

File metadata

File hashes

Hashes for groundwork-0.1.11-py2-none-any.whl
Algorithm Hash digest
SHA256 fbd6b2d5b9034882631160911675a95b5c704faed72eb934c18c2d12f8c268bd
MD5 22630d38a226af61a8d772416c2f8b91
BLAKE2b-256 e55edb7793ddbbe36701e8bb020fc78046b3fc9278119923200fb0fb90f18241

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