创建python项目骨架
项目描述
python-seed
创建新Python包的启动套件。
这是一个创建新Python包的启动仓库。包括标准文件的模板以及最佳实践。
安装
您可以使用pip安装python-seed
$ pip install -U pip
$ pip install python-seed
或从源安装
$ git clone https://github.com/developmentseed/python-seed.git
$ cd python-seed
$ pip install -U pip
$ pip install -e .
用法
$ pyseed --help
Usage: pyseed [OPTIONS] COMMAND [ARGS]...
python-seed subcommands.
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
create Create new python seed skeleton
$ pyseed create --help
Usage: pyseed create [OPTIONS] NAME
Create new python seed skeleton.
Options:
--ci [circleci|github] Add CI configuration
--help Show this message and exit.
创建新的python项目
# Create a project without CI
$ pyseed create awesomepythonproject
# List files created
$ ls -1 awesomepythonproject
.pre-commit-config.yaml
README.md
awesomepythonproject/
requirements-dev.txt
requirements.txt
setup.py
tests/
tox.ini
使用CI框架
# Create a project github actions
$ pyseed create awesomepythonproject --ci github
# List files created
$ ls -1 awesomepythonproject
.github/workflows/ci.yml
codecov.yml
.pre-commit-config.yaml
README.md
awesomepythonproject/
requirements-dev.txt
requirements.txt
setup.py
tests/
tox.ini
项目结构
my-project/
├── .circleci/ or .github/ - CI configuration.
├── codecov.yml - codecov configuration (only if CI is added).
├── .pre-commit-config.yaml - pre-commit configuration.
├── README.md - project readme.
├── my_project/ - core python module.
├── tests/ - tests suite placeholder for your module.
├── requirements.txt - python requirements (!!! by default requirements are written in setup.py)
├── requirements-dev.txt - python dev requirements (!!! by default requirements are written in setup.py)
└──tox.ini - TOX configuration.
贡献与发展
问题和拉取请求非常受欢迎。
dev安装
$ git clone https://github.com/developmentseed/python-seed.git
$ cd python-seed
$ pip install -e .[dev]
仅支持Python3.7
此仓库设置为在提交新代码时使用pre-commit
运行isort、flake8、pydocstring、black("坚定的Python代码格式化器")和mypy。
$ pre-commit install
关于
python-seed由Development Seed创建
项目详情
关闭
python-seed-1.1.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | e0d66d375124ec71e7670be525601e2107de50f8dcd0a46cdca36fcffb06795e |
|
MD5 | fb884d9e6a162a05169ec5b9a29f9346 |
|
BLAKE2b-256 | 06b1a5e6085988ac5ea7ce238aa7a2d95fd2b603ea602a20bc71ea2e146e81d2 |