Plugins Framework
Project description
一、README
以Plugin的形式集成命令行脚本,便于脚本的集中管理
所有的插件放在项目Plugins目录才能被检查到
二、使用示例
2.1 插件自动生成run方法
使用Decorator添加run()方法
import PluginsPy as PluginsPy
@PluginsPy.addRun
class PluginExample:
2.2 插件参数声明
- 第一行是类说明,在帮助中显示
- @开头并且以:分开的是参数及其说明
- 之外的是普通说明,可以自行添加,譬如以*号开始列表
@PluginsPy.addRun
class PluginExample:
"""
PluginExample类是一个编写LogTools插件的示例
@id: 唯一码
@name: 唯一码别名
"""
2.3 插件使用
from PluginsPy import PluginsPy
if __name__ == '__main__':
PluginsPy(__file__)
三、dist
- pip3 install twine
- https://pypi.org/
- 注册帐号
- python3 setup.py sdist bdist_wheel
- twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/ Enter your username: zengjf Enter your password: Uploading PluginsPy-0.0.1-py3-none-any.whl 100% ---------------------------------------- 8.4/8.4 kB • 00:00 • ? Uploading PluginsPy-0.0.1.tar.gz 100% ---------------------------------------- 6.6/6.6 kB • 00:00 • ? View at: https://pypi.org/project/PluginsPy/0.0.1/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for PluginsPy-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a0518558a77939e6e9b573325484d28b7d2872a68de6f2cc5e36e33f6075907 |
|
MD5 | 789d1e2e0d61aa92d68e506886b00d7d |
|
BLAKE2b-256 | cb23428816d30d37738ee76e57ffcaebf989e4bf3bed34f44a09952e667d3dff |