This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Provides plugin basename lookup and meta data extraction functionality. It’s meant for in-application feature and option management. The descriptor format (self-contained in each script) is basically:

# encoding: UTF-8
# api: python
# type: handler
# category: io
# title: Plugin configuration
# description: Read meta data, pyz/package contents, module locating
# version: 0.5
# priority: core
# docs: http://fossil.include-once.org/streamtuner2/wiki/plugin+meta+data
# config: { name: xyz, value: 1, type: bool, description: "Sets..." }
#
# Documentation goes here...

The key: value format is language-agnostic. It’s basically YAML in the topmost script comment. For Python only # hash comments are used. Defaults to rather common field names, encourages a documentation block, and an obvious config: { .. } spec for options and defaults.

What it’s not:

  • This is not another config reader/parser/storage class.
  • Doesn’t impose a specific plugin API.
  • Neither concerns itself with module/package loading. (How boring.)

What for then?

  • Separates code from meta data.
  • Avoids keeping seldomly used descriptors in variables.
  • Does away with cluttering external ini/json files with each module script.
  • Prevents hodgepodge and premature module loading just to inspect meta data.
  • Simplifies both internal use and meta info accessibility to external tools.
  • (pluginconf is less about a concrete implementation/code, but pushing a universal meta data format.)

Sample

See streamtuner2-2.1.7-dev.pyz for the original implementation.

pluginconf doesn’t yet bundle GUI construction (a Gtk handler exists, Tk alternative planned).

API

Configuration is currently just done by injecting:

plugin_base = ["myapp.plugins", "etc.extensions"]
module_base = "pluginconf"

Which declares module and plugin basenames. (Works for literal setups and within PYZ applications.)

plugin_meta( module= | fn= | src= | frame= )

Returns a meta data dictionary for the given module name, file, source code, or caller frame.:

{
  "title": "Compound★",
  "description": "...",
  "version": "0.1",
  "type": "channel",
  "category": "virtual",
  ...
}

And that’s already what it does.

Everything else is implementation-specific feature creep.

module_list()

Returns basenames of available/installed plugins.

add_plugin_defaults()

Populates your config_options{} and plugin_states{} list. Can be a classic dict, or one of the hundreds of config parser/managers.

get_data( fn= )

Is mostly an alias for pkgutil.get_data(). Abstracts usage within PYZ packages a little.

argparse_map()

Provides a simpler way to specify ugly argparse definitions. And allows to amass options from plugins.

Status

It’s currently just an excerpt from streamtuner2.

  • Lacks the configuration GUI integration.
  • Or the plugin repo JSON loader.
  • Definitely needs customization prior use.
  • See some format documentation

It’s also not a proper wheel package; just quickly built per xpm:

fpm -s src -t pip pluginconf.py

(Yep, the description fields can double as packaging source. An additional # pack: specifier allows deb/rpm/arch/exe/pyzw/pip generation without tedious duplication of package descriptions.)

Release History

Release History

0.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pluginconf-0.6-py2-none-any.whl (11.1 kB) Copy SHA256 Checksum SHA256 py2 Wheel May 18, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting