Skip to main content

Python包创建工具

项目描述

PyPCreate

Pypcreate 是一个易于使用的 Python 包创建工具。

安装

pip install pypcreate

# to upgrade 
pip install --upgrade pypcreate

用法

1个mkdir

用空的__init__.pyand创建一个目录README.md

pypcreate --mkdir directory_name

2 yamlmkdir

要从 yaml 文件创建设置目录:

pycreate --yamlmkdir yamlname.yaml

yaml 文件的格式应遵循以下格式:

name: example

root:
  dir_1:
    dir_name: 'example1' # directory name
    files: ['__init__.py','README.md','example.py'] # specify the empty files in the directory 
    dir_1: 
      dir_name: 'sub_example1' # directory name
      files: ['hello.py'] 

  dir_2:
    dir_name: 'example2' # here is the name of directory 2 
    files: ['__init__.py'] 

笔记:

  • 您必须指定根
  • 对于子文件夹,您需要从dir_1变量开始
  • 对于目录名称,变量名称应为dir_name
  • 对于创建文件,变量名应该是files

3 设置

要创建所有空的设置文件:setup.py, MANIFEST.in, environment.yml:

pycreate --setpyp

4 pyptemp

要将所有设置文件下载到当前目录:setup.py, MANIFEST.in, environment.yml:

pycreate --pyptemp

5 初始温度

下载__init__.py模板:

pycreate --inittemp

6 mkdocs_temp

要下载 mkdocs 模板 zip 文件:

pypcreate --mkdocs_temp

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

pypcreate-0.2.7.ta​​r.gz (16.1 kB 查看哈希

已上传 source

内置分布

pypcreate-0.2.7-py3-none-any.whl (18.6 kB 查看哈希

已上传 py3