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.10.tar.gz (110.4 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.10-py3.5.egg (197.3 kB view details)

Uploaded Egg

groundwork-0.1.10-py3-none-any.whl (133.5 kB view details)

Uploaded Python 3

groundwork-0.1.10-py2.7.egg (192.1 kB view details)

Uploaded Egg

groundwork-0.1.10-py2-none-any.whl (133.5 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for groundwork-0.1.10.tar.gz
Algorithm Hash digest
SHA256 7ad6a2a73599b5a93f8b4baed5499b006bf10f9fd771f3cac8c530ba5a187e9d
MD5 03be25730aa6b7d89ff5ea8c0921aadd
BLAKE2b-256 71f55c3eb08739140250f5058e89029268441ab09524113f6c80992d9792602c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for groundwork-0.1.10-py3.5.egg
Algorithm Hash digest
SHA256 3698a719dbb206244d33870484950a516ee77e8b3265a8895b085dafc17efc0e
MD5 82c6e8a77db082e9d1960e828d2522d7
BLAKE2b-256 ac338c0c0e70d3f5e99ccd7e736d714e6fafc2927b9c281ade103bf9c5872379

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for groundwork-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 a2e96fb5cddd72e76b598b9579a40166ef3cf7136273ccec5cf2761175307aa9
MD5 fdb32a1934db143602a6263ef8bdd797
BLAKE2b-256 e42e009987b4927df7de23c7812ea70420501788720e70d05340870a445e1681

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for groundwork-0.1.10-py2.7.egg
Algorithm Hash digest
SHA256 aeebf98b47e964ceccdabffca9f9600a48efa5f78a06452efd719a2aa74acff5
MD5 3bea1d4c1ed861b830b17e10e8ba2c9a
BLAKE2b-256 9de8e46df585a221233b8267861226c88bef5e33b411d01a59f3d03cfecec309

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for groundwork-0.1.10-py2-none-any.whl
Algorithm Hash digest
SHA256 0c3cc3e1a4537402906054d00fc68baf5ff149a3d0f275e4661b43e20d75de58
MD5 d581066cfb7df074212a0f64e2613f38
BLAKE2b-256 1ff6a5894c5aa17da5371483c63ebf224abc7b217a4694bfbf2ba306a5e442be

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