{ "info": { "author": "mario", "author_email": "mario at snig", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: Public Domain", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development :: Pre-processors" ], "description": "Provides *plugin basename* lookup and **meta data extraction** functionality. It's meant for in-application feature and option management. The descriptor\nformat (*self-contained* in each script) is basically::\n\n # encoding: UTF-8\n # api: python\n # type: handler\n # category: io\n # title: Plugin configuration\n # description: Read meta data, pyz/package contents, module locating\n # version: 0.5\n # priority: core\n # docs: http://fossil.include-once.org/streamtuner2/wiki/plugin+meta+data\n # config: { name: xyz, value: 1, type: bool, description: \"Sets...\" }\n #\n # Documentation goes here...\n\nThe `key: value` format is language-agnostic. It's basically YAML in the\ntopmost script comment. For Python only # hash comments are used. Defaults\nto rather common field names, encourages a documentation block, and an obvious\n`config: { .. }` spec for options and defaults.\n\nWhat it's not:\n\n - This is **not** another config reader/parser/storage class.\n - Doesn't impose a specific plugin API.\n - Neither concerns itself with module/package loading. *(How boring.)*\n\nWhat for then?\n\n - Separates code from meta data.\n - Avoids keeping seldomly used descriptors in variables.\n - Does away with cluttering external ini/json files with each module script.\n - Prevents hodgepodge and premature module loading just to inspect meta data.\n - Simplifies both internal use and meta info **accessibility to external tools**.\n - (`pluginconf` is less about a concrete implementation/code, but pushing a universal meta data format.)\n\nSample\n\nSee `streamtuner2-2.1.7-dev.pyz`_ for the original implementation.\n\n.. image:: http://fossil.include-once.org/streamtuner2/raw/946c0e32c868a22facd7498250451723a50ab00a?m=image/png\n :width: 285\n :height: 325\n :alt: Plugin enable/disable and option list in streamtuner2\n\n`pluginconf` doesn't yet bundle GUI construction (a Gtk handler exists, Tk alternative planned).\n\nAPI\n===\n\nConfiguration is currently just done by injecting::\n\n plugin_base = [\"myapp.plugins\", \"etc.extensions\"]\n module_base = \"pluginconf\"\n\nWhich declares module and plugin basenames. (Works for literal setups **and** within PYZ applications.)\n\n\nplugin_meta( module= | fn= | src= | frame= )\n--------------------------------------------\n\nReturns a meta data dictionary for the given module name, file,\nsource code, or caller frame.::\n\n {\n \"title\": \"Compound\u2605\",\n \"description\": \"...\",\n \"version\": \"0.1\",\n \"type\": \"channel\",\n \"category\": \"virtual\",\n ...\n }\n\nAnd that's already what it does.\n\nEverything else is implementation-specific feature creep.\n\n\nmodule_list()\n-------------\n\nReturns basenames of available/installed plugins.\n\n\nadd_plugin_defaults()\n---------------------\n\nPopulates your config_options{} and plugin_states{} list. Can\nbe a classic dict, or one of the hundreds of config parser/managers.\n\n\nget_data( fn= )\n---------------\n\nIs mostly an alias for pkgutil.get_data(). Abstracts usage within\nPYZ packages a little.\n\n\nargparse_map()\n--------------\n\nProvides a simpler way to specify ugly argparse definitions. And\nallows to amass options from plugins.\n\n\nStatus\n======\n\nIt's currently just an excerpt from streamtuner2_.\n\n - Lacks the configuration GUI integration.\n - Or the plugin `repo JSON`_ loader.\n - Definitely needs customization prior use.\n - See some `format documentation`_\n\nIt's also not a proper wheel package; just quickly built per ``xpm``::\n\n fpm -s src -t pip pluginconf.py\n\n(Yep, the description fields *can* double as packaging source. An additional `# pack:` specifier\nallows deb/rpm/arch/exe/pyzw/pip generation without tedious duplication of package descriptions.)\n\n.. _streamtuner2: http://fossil.include-once.org/streamtuner2/\n.. _`repo JSON`: http://fossil.include-once.org/repo.json/streamtuner2/contrib/*.py\n.. _`format documentation`: http://fossil.include-once.org/streamtuner2/wiki?name=plugin+meta+data\n.. _`streamtuner2-2.1.7-dev.pyz`: http://sourceforge.net/projects/streamtuner2/files/streamtuner2-2.1.7-dev.pyz/download", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://fossil.include-once.org/streamtuner2/", "keywords": "meta, comment, plugin-spec", "license": "Public Domain", "maintainer": null, "maintainer_email": null, "name": "pluginconf", "package_url": "https://pypi.org/project/pluginconf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pluginconf/", "project_urls": { "Homepage": "http://fossil.include-once.org/streamtuner2/" }, "release_url": "https://pypi.org/project/pluginconf/0.6.7/", "requires_dist": null, "requires_python": null, "summary": "Reads meta comment block from source files, pyz/package contents, module locating", "version": "0.6.7" }, "last_serial": 2548696, "releases": { "0.5": [ { "comment_text": "", "digests": { "md5": "5cd88c35b4278630cc04deef36cab888", "sha256": "ac817c8f10c48fe06fd5f5866f0b3d8971d42ba1f8b746d15865bf15be78a091" }, "downloads": -1, "filename": "pluginconf-0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "5cd88c35b4278630cc04deef36cab888", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 10111, "upload_time": "2015-05-04T18:01:11", "url": "https://files.pythonhosted.org/packages/e5/42/e933bb9b9e3036c802ed85382525c92c209d8b9b0940415d9715a2e9fd73/pluginconf-0.5-py2-none-any.whl" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "4320947da179ba23f3f0886df3d3b8d7", "sha256": "47d520854c52978640d6711e62e6991e957e17e4be1a0975d5e5a93d844f2bcd" }, "downloads": -1, "filename": "pluginconf-0.6-py2-none-any.whl", "has_sig": false, "md5_digest": "4320947da179ba23f3f0886df3d3b8d7", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11093, "upload_time": "2015-05-18T22:31:21", "url": "https://files.pythonhosted.org/packages/72/93/c7a5e901cfe4bf5e030788c1ac3acd2d48b04b940d1d60948a7cdfbe7c0c/pluginconf-0.6-py2-none-any.whl" } ], "0.6.7": [ { "comment_text": "", "digests": { "md5": "6e1f53f8f79b19e5da11a8b44fd5ed0d", "sha256": "435864eac9975f32d36c20c5c53b948a56932f2a41ffc47e19ac8139642586aa" }, "downloads": -1, "filename": "pluginconf-0.6.7-py2-none-any.whl", "has_sig": false, "md5_digest": "6e1f53f8f79b19e5da11a8b44fd5ed0d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11843, "upload_time": "2017-01-01T21:34:33", "url": "https://files.pythonhosted.org/packages/ac/4d/e315d021b02ae7ea2b77a22f4498a8d1317ace2b4e031c3ce1e58592df3d/pluginconf-0.6.7-py2-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6e1f53f8f79b19e5da11a8b44fd5ed0d", "sha256": "435864eac9975f32d36c20c5c53b948a56932f2a41ffc47e19ac8139642586aa" }, "downloads": -1, "filename": "pluginconf-0.6.7-py2-none-any.whl", "has_sig": false, "md5_digest": "6e1f53f8f79b19e5da11a8b44fd5ed0d", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11843, "upload_time": "2017-01-01T21:34:33", "url": "https://files.pythonhosted.org/packages/ac/4d/e315d021b02ae7ea2b77a22f4498a8d1317ace2b4e031c3ce1e58592df3d/pluginconf-0.6.7-py2-none-any.whl" } ] }