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.9.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.9-py3.4.egg (197.4 kB view details)

Uploaded Egg

groundwork-0.1.9-py3-none-any.whl (133.4 kB view details)

Uploaded Python 3

groundwork-0.1.9-py2.7.egg (191.9 kB view details)

Uploaded Egg

groundwork-0.1.9-py2-none-any.whl (133.4 kB view details)

Uploaded Python 2

File details

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

File metadata

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

File hashes

Hashes for groundwork-0.1.9.tar.gz
Algorithm Hash digest
SHA256 426eb0d4fa304f5b8ebaaf8965d5903a5571bd7925f5d7044da77c3697828d20
MD5 3c93b9319b049af894505db76e2fa8f5
BLAKE2b-256 a39efacb56d7a77be27f7abfefe25d8e7cd10ab39dd52b330be60608a19cfe79

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for groundwork-0.1.9-py3.4.egg
Algorithm Hash digest
SHA256 07f81f5325c09baa4a2dd0661be6a7bfba33f4980f55a94aeda1556c55f9ccd3
MD5 8e2b5d493167256bdb41ceb06014f5c1
BLAKE2b-256 698c89ea02bf29b7a28dd7295ce155fee51f13ad18bd170383ce00f208b6e95d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for groundwork-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ac870fab5f7420f7c6dfbd8f372cbf24759cf64619d83355f0092259da70f255
MD5 72afcc2b4d5d31d901c3bcbff83d57eb
BLAKE2b-256 93e465f2f5a11af34e8b460194e251b5d13b49fa7e0cb6507c21b24a3d51fe47

See more details on using hashes here.

File details

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

File metadata

  • Download URL: groundwork-0.1.9-py2.7.egg
  • Upload date:
  • Size: 191.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for groundwork-0.1.9-py2.7.egg
Algorithm Hash digest
SHA256 e672146ccd5cf95e747b16a34162300d38ec61e55cbe2e4747743c23ade1346c
MD5 94c77f82e91f80abd5747ff95f733ba2
BLAKE2b-256 e25c80aa724c8a9159ba647a6cd319028c8234e83ec55fded945093f747808e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for groundwork-0.1.9-py2-none-any.whl
Algorithm Hash digest
SHA256 bea295f1c61f7ff14b5a987b1e0d7f8e5269ff104f4887e494906956d028c7ec
MD5 82600a6d5de7017d6fc6de2b165d8dbb
BLAKE2b-256 a52238bbeb7b30480c2c5aae3b07b4978ad6a7ee7b36f55f4210fdb5c8ae369b

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