PowerConsole Extension Specification

Extension Interface Specification

PowerConsole execution engine is extensible through user defined Python objects that are passed to PowerConsole constructor. These objects must conform to this Extension Interface Specification.

Specification v1

name
Mandatory attribute containing unique name of the extension package.
version
Mandatory attribute containing package version.
summary
Mandatory attribute containing short package description.
url
Mandatory attribute containing URL to package home website.
download_url
Mandatory attribute containing URL to package download area.
description
Mandatory attribute containing package description.
author
Mandatory attribute containing package author name.
author_email
Mandatory attribute containing author’s contact e-mail address.
license
Mandatory attribute containing license used for package distrbution.
controller_extensions()
Optional method. When defined must return list of controller extension objects.
commands()
Optional method. When defined must return list of command objects.
show_extensions()
Optional method. When defined must return list of show extension objects.
help_providers()
Optional method. When defined must return list of help provider objects.
object_renderers()
Optional method. When defined must return list of object renderer objects.

If you are going to use setuptools for your extension package distribution (which is recommended), you may use the provided base class ExtensionPackage for your extension object. This base class implements all mandatory attributes and can fill their values from setuptools package metadata.

Extension Package Specification

Extensions could be packaged and distributed in any format, but official PowerConsole applications will support only extensions that would conform to this Extension Package Specification. So if you’re planning to develop extensions for public use, or PowerConsole-based applications that would support thrid-party extensions, you should follow this specification in your product.

Specification v1

Package must be a setuptools package that registers at least one ‘powerconsole.package’ entry point.

Example setup.py for package:

from setuptools import setup, find_packages

setup(
    ...
    entry_points = {
        'powerconsole.package': [
            'firebird = pwc.fbcmd:packageFirebird'
    },
    ...
    )

Each registered callable (it could be a function or class) should accept keyword arguments and must return single object conforming to Extension Interface Specification.

Table Of Contents

Previous topic

Standard Commands

Next topic

How to implement new commands

This Page