Skip to main content

python开发模块

Project description

xy_pydev

说明

简单Python模块开发工具.

源码仓库

安装

# bash
pip install xy_pydev

说明

1. 显示帮助
# bash
xy_pydev -h
# usage: xy_pydev-1.0.9 [-h] [-w [WORK]] [-n [NAME]] [-m [MODULE_CLASS_NAME]] [-s [SCRIPTS]]

# python模块开发工具

# options:
#   -h, --help            show this help message and exit
#   -w [WORK], --work [WORK]
#                         工作方式: 1.clean | c => 清理模块缓存, 2.build | b => 编译, python -m build, 3.sdist | sd => python setup.py sdist bdist_wheel, 4.utpi | ut => 提交到test.pypi.org, upload to test.pypi.org, 5.upi | u => 提交到pypi.org, upload
#                         to pypi.org, 6.其他 => 创建项目,
#   -n [NAME], --name [NAME]
#                         Python模块名称 不能包含中文
#   -m [MODULE_CLASS_NAME], --module_class_name [MODULE_CLASS_NAME]
#                         模块入口类名称 不能包含中文
#   -s [SCRIPTS], --scripts [SCRIPTS]
#                         是否开启全局命令
2. 清理缓存
# bash
# 删除缓存
xy_pydev -w c
# ======================================
# 开始清理模块缓存...
# ======================================
# ======================================
# 即将清理包含以下列表中名称的目录或者文件: 
# ['dist', '.egg-info', 'build']
# ======================================
# ======================================
# 检测到以下缓存
# ======================================
# build
# ======================================
# xy_pydev.egg-info
# ======================================
# dist
# ======================================
# ======================================
# 是否确定删除缓存?
# Y ==> [确定]
# 其他 ==> [取消]
# 请输入[Y/n]
3. 创建简易模块
# 当前目录在 /home/helios/workspace/project/opensource/xy-base/xy_pydev/test
xy_pydev
# 出现引导,也可以按需提前设置参数
# ======================================
# 请输入新模块名称, 不能包含中文
# xy_demo
# ======================================
# 新模块名称为: xy_demo
# ======================================
# 是否需要修改模块入口类名称?
# 当前为: Runner
# 不能包含中文
# Y=>代表[需要];
# 其他=>代表[不需要]
# 请输入[ Y/n ]
# ======================================
# 是否需要添加全局命令?
# Y=>代表[添加];
# 其他=>代表[不添加]
# 请输入[ Y/n ]
# ======================================
# 新模块创建完成!!!
4. 创建包含全局命令的模块
xy_pydev
# ======================================
# 请输入新模块名称, 不能包含中文
# xy_full_demo
# ======================================
# 新模块名称为: xy_full_demo
# ======================================
# 是否需要修改模块入口类名称?
# 当前为: Runner
# 不能包含中文
# Y=>代表[需要];
# 其他=>代表[不需要]
# 请输入[ Y/n ]
# ======================================
# 是否需要添加全局命令?
# Y=>代表[添加];
# 其他=>代表[不添加]
# 请输入[ Y/n ]
# Y
# ======================================
# 新模块创建完成!!!
5. 指定参数创建模块
xy_pydev -h
# usage: xy_pydev-1.0.8 [-h] [-w [WORK]] [-n [NAME]] [-m [MODULE_CLASS_NAME]] [-s [SCRIPTS]]

# python模块开发工具

# options:
#   -h, --help            show this help message and exit
#   -w [WORK], --work [WORK]
#                         工作方式: 1.clean | c => 清理模块缓存, 2.build | b => 编译, 3.sdist | sd => python setup.py sdist bdist_wheel, 4.utpi | ut => 提交到test.pypi.org, upload to test.pypi.org, 5.upi | u => 提交到pypi.org, upload to pypi.org, 6.其他  => 创建项目
#   -n [NAME], --name [NAME]
#                         Python模块名称 不能包含中文
#   -m [MODULE_CLASS_NAME], --module_class_name [MODULE_CLASS_NAME]
#                         模块入口类名称 不能包含中文
#   -s [SCRIPTS], --scripts [SCRIPTS]
#                         是否开启全局命令

xy_pydev -n xy_arg_demo -m ARG_DEMO -s 1
# ======================================
# 新模块名称为: xy_arg_demo
# ======================================
# 新模块创建完成!!!
提示

在使用 xy_pydev 创建模块后可以引入
xy_argparse.github
xy_argparse.gitee
或者
xy_work.github
xy_work.gitee
进行定制和扩展模块的功能.

许可证

xy_pydev 根据 <木兰宽松许可证, 第2版> 获得许可。有关详细信息,请参阅 LICENSE 文件。

捐赠

如果小伙伴们觉得这些工具还不错的话,能否请咱喝一杯咖啡呢?
Pay-Total

联系方式

微信: yuyangiit
邮箱: yuyangit.0515@qq.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xy_pydev-1.0.10.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

xy_pydev-1.0.10-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file xy_pydev-1.0.10.tar.gz.

File metadata

  • Download URL: xy_pydev-1.0.10.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for xy_pydev-1.0.10.tar.gz
Algorithm Hash digest
SHA256 9646bb33ca3eec706cd75d0b8b5da08450680d1e43bceefbccea7eee0eaaf965
MD5 bac1aa1d6414ef05f919a933281fb66b
BLAKE2b-256 4cf02227aa4f77e34de7269f34eb025f1eb2c9a58df2d8aa004fbd99b139f51a

See more details on using hashes here.

File details

Details for the file xy_pydev-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: xy_pydev-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for xy_pydev-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 e6ce165f0e87f443141c7fe4e195c958e7059b1934c5d7ec715e996b16de8c3c
MD5 b7d053358539c91af64ce5baf0c7d0e8
BLAKE2b-256 7e01713ff2a3da7bf43c0eff34bad280aa316cb87868316cb1ed36e57e7f6f07

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page