插件处理系统
multipla的Python项目详细描述
(拼写类似multiplug)这个模块的目的是提供一个非常简单的 插件处理程序模块。我想要些东西:
- 能够处理多个插件(这很明显)
- 能够处理同一个插件的多个实现
- 能够单独处理多个pkg_resources.WorkingSet-s…。
- 易于在可插入应用程序/框架中初始化。
我想要这样的东西:
content_types=multipla.power_up('scriba.content_types')defto_json(object):content_type=content_types.get('application/json')returncontent_type.format(ojbect)defto_user_supplied_type(object,content_type):returncontent_types.get(content_type).format(object)
或:
fromloremipsumimportgeneratorimportmultiplasamples=multipla.power_up('loremipsum.samples')vaporware=generator.Generator(samples.get('vaporware'))
您可以阅读有关Pythonhosted或Read the Docs的更多信息。从这个包裹开始 有大量的docstring文档和代码注释,您可以 浏览源代码或在python交互式shell中阅读更多内容。