pyproject-creator


Namepyproject-creator JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://github.com/atiasn/pyproject-creator
SummaryA tool to create Python project templates
upload_time2024-06-12 08:51:49
maintainerNone
docs_urlNone
authorNextKele
requires_python<4.0,>=3.11
licenseMIT
keywords packaging pyproject-creator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pyproject Creator
![test](https://github.com/atiasn/pyproject-creator/actions/workflows/test.yml/badge.svg?branch=master)
[![PyPI - Version](https://img.shields.io/pypi/v/pyproject-creator)](https://pypi.org/project/pyproject-creator/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyproject-creator)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)

Pyproject Creator 是一个旨在简化创建 Python 项目过程的工具。它可以生成一些基础项目结构组件。

基础组件:
- Poetry 用于包管理
- pre-commit 用于代码格式化和 linting
- Commitizen 用于规范 git commit

可选组件
- 日志
- 使用 pytest 的测试
- GitHub Action 工作流等

## 安装

### 依赖项

项目依赖于以下库:
- **python 3.11+**: https://www.python.org/downloads/
- **poetry 1.8.3**+: https://python-poetry.org/docs/

### 源码安装

按照以下步骤进行源码安装:

1. **克隆仓库**:将 Pyproject Creator 仓库克隆到您的本地计算机。
   ```bash
   git clone https://github.com/atiasn/pyproject-creator.git
   cd pyproject-creator
   ```

2. **安装依赖项**:导航到仓库目录并运行以下命令以安装依赖项:

    ```bash
    poetry install --only main
    ```

3. **运行工具**:执行以下命令运行 Pyproject Creator:

    ```bash
    pypct
    ```

## 使用方法

运行 Pyproject Creator 后,将提示您提供有关项目的详细信息:

- **项目名称**:输入项目名称。名称应以字母或数字开头,仅包含字母、数字、下划线和连字符,但不应以下划线或连字符开头或结尾。

- **项目描述**:提供项目的简要描述,默认为空。

- **作者名称**:以指定的格式输入您的姓名和电子邮件地址,格式为:`"Your Name <your.email@example.com>"`。

- **Python 版本**:指定您想要为项目使用的 Python 版本,默认为 3.11。

- **项目许可证**:选择项目的许可证,默认为空。

- **创建日志包**:选择是否在项目中创建日志包,默认为是。

- **创建测试目录**:选择是否包含使用 pytest 的测试目录,默认为是。

- **创建 GitHub Action**:选择是否为您的项目的主分支创建 GitHub Action 工作流,默认为否。

- **是否发布到 PyPI**:选择是否将项目发布到 PyPI,默认为否。

提供必要的详细信息后,Pyproject Creator 将设置您的项目结构并配置必要的文件。按照屏幕上的说明完成流程。

## 贡献

欢迎为 Pyproject Creator 做出贡献!如果您遇到任何问题或有改进建议,请随时在 [GitHub 仓库](https://github.com/atiasn/pyproject-creator) 上提出问题或提交拉取请求。

## 许可证

本项目采用 MIT 许可证授权。有关详细信息,请参阅 [LICENSE](LICENSE) 文件。

---

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/atiasn/pyproject-creator",
    "name": "pyproject-creator",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "packaging, pyproject-creator",
    "author": "NextKele",
    "author_email": "ritboylei@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a8/b9/feb25d6db4ec20330c00f207386fe761b70a17e8fb69f9638e98227fa041/pyproject_creator-0.4.1.tar.gz",
    "platform": null,
    "description": "# Pyproject Creator\n![test](https://github.com/atiasn/pyproject-creator/actions/workflows/test.yml/badge.svg?branch=master)\n[![PyPI - Version](https://img.shields.io/pypi/v/pyproject-creator)](https://pypi.org/project/pyproject-creator/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyproject-creator)\n[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)\n\nPyproject Creator \u662f\u4e00\u4e2a\u65e8\u5728\u7b80\u5316\u521b\u5efa Python \u9879\u76ee\u8fc7\u7a0b\u7684\u5de5\u5177\u3002\u5b83\u53ef\u4ee5\u751f\u6210\u4e00\u4e9b\u57fa\u7840\u9879\u76ee\u7ed3\u6784\u7ec4\u4ef6\u3002\n\n\u57fa\u7840\u7ec4\u4ef6\uff1a\n- Poetry \u7528\u4e8e\u5305\u7ba1\u7406\n- pre-commit \u7528\u4e8e\u4ee3\u7801\u683c\u5f0f\u5316\u548c linting\n- Commitizen \u7528\u4e8e\u89c4\u8303 git commit\n\n\u53ef\u9009\u7ec4\u4ef6\n- \u65e5\u5fd7\n- \u4f7f\u7528 pytest \u7684\u6d4b\u8bd5\n- GitHub Action \u5de5\u4f5c\u6d41\u7b49\n\n## \u5b89\u88c5\n\n### \u4f9d\u8d56\u9879\n\n\u9879\u76ee\u4f9d\u8d56\u4e8e\u4ee5\u4e0b\u5e93\uff1a\n- **python 3.11+**: https://www.python.org/downloads/\n- **poetry 1.8.3**+: https://python-poetry.org/docs/\n\n### \u6e90\u7801\u5b89\u88c5\n\n\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u6e90\u7801\u5b89\u88c5\uff1a\n\n1. **\u514b\u9686\u4ed3\u5e93**\uff1a\u5c06 Pyproject Creator \u4ed3\u5e93\u514b\u9686\u5230\u60a8\u7684\u672c\u5730\u8ba1\u7b97\u673a\u3002\n   ```bash\n   git clone https://github.com/atiasn/pyproject-creator.git\n   cd pyproject-creator\n   ```\n\n2. **\u5b89\u88c5\u4f9d\u8d56\u9879**\uff1a\u5bfc\u822a\u5230\u4ed3\u5e93\u76ee\u5f55\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u5b89\u88c5\u4f9d\u8d56\u9879\uff1a\n\n    ```bash\n    poetry install --only main\n    ```\n\n3. **\u8fd0\u884c\u5de5\u5177**\uff1a\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884c Pyproject Creator\uff1a\n\n    ```bash\n    pypct\n    ```\n\n## \u4f7f\u7528\u65b9\u6cd5\n\n\u8fd0\u884c Pyproject Creator \u540e\uff0c\u5c06\u63d0\u793a\u60a8\u63d0\u4f9b\u6709\u5173\u9879\u76ee\u7684\u8be6\u7ec6\u4fe1\u606f\uff1a\n\n- **\u9879\u76ee\u540d\u79f0**\uff1a\u8f93\u5165\u9879\u76ee\u540d\u79f0\u3002\u540d\u79f0\u5e94\u4ee5\u5b57\u6bcd\u6216\u6570\u5b57\u5f00\u5934\uff0c\u4ec5\u5305\u542b\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u4e0b\u5212\u7ebf\u548c\u8fde\u5b57\u7b26\uff0c\u4f46\u4e0d\u5e94\u4ee5\u4e0b\u5212\u7ebf\u6216\u8fde\u5b57\u7b26\u5f00\u5934\u6216\u7ed3\u5c3e\u3002\n\n- **\u9879\u76ee\u63cf\u8ff0**\uff1a\u63d0\u4f9b\u9879\u76ee\u7684\u7b80\u8981\u63cf\u8ff0\uff0c\u9ed8\u8ba4\u4e3a\u7a7a\u3002\n\n- **\u4f5c\u8005\u540d\u79f0**\uff1a\u4ee5\u6307\u5b9a\u7684\u683c\u5f0f\u8f93\u5165\u60a8\u7684\u59d3\u540d\u548c\u7535\u5b50\u90ae\u4ef6\u5730\u5740\uff0c\u683c\u5f0f\u4e3a\uff1a`\"Your Name <your.email@example.com>\"`\u3002\n\n- **Python \u7248\u672c**\uff1a\u6307\u5b9a\u60a8\u60f3\u8981\u4e3a\u9879\u76ee\u4f7f\u7528\u7684 Python \u7248\u672c\uff0c\u9ed8\u8ba4\u4e3a 3.11\u3002\n\n- **\u9879\u76ee\u8bb8\u53ef\u8bc1**\uff1a\u9009\u62e9\u9879\u76ee\u7684\u8bb8\u53ef\u8bc1\uff0c\u9ed8\u8ba4\u4e3a\u7a7a\u3002\n\n- **\u521b\u5efa\u65e5\u5fd7\u5305**\uff1a\u9009\u62e9\u662f\u5426\u5728\u9879\u76ee\u4e2d\u521b\u5efa\u65e5\u5fd7\u5305\uff0c\u9ed8\u8ba4\u4e3a\u662f\u3002\n\n- **\u521b\u5efa\u6d4b\u8bd5\u76ee\u5f55**\uff1a\u9009\u62e9\u662f\u5426\u5305\u542b\u4f7f\u7528 pytest \u7684\u6d4b\u8bd5\u76ee\u5f55\uff0c\u9ed8\u8ba4\u4e3a\u662f\u3002\n\n- **\u521b\u5efa GitHub Action**\uff1a\u9009\u62e9\u662f\u5426\u4e3a\u60a8\u7684\u9879\u76ee\u7684\u4e3b\u5206\u652f\u521b\u5efa GitHub Action \u5de5\u4f5c\u6d41\uff0c\u9ed8\u8ba4\u4e3a\u5426\u3002\n\n- **\u662f\u5426\u53d1\u5e03\u5230 PyPI**\uff1a\u9009\u62e9\u662f\u5426\u5c06\u9879\u76ee\u53d1\u5e03\u5230 PyPI\uff0c\u9ed8\u8ba4\u4e3a\u5426\u3002\n\n\u63d0\u4f9b\u5fc5\u8981\u7684\u8be6\u7ec6\u4fe1\u606f\u540e\uff0cPyproject Creator \u5c06\u8bbe\u7f6e\u60a8\u7684\u9879\u76ee\u7ed3\u6784\u5e76\u914d\u7f6e\u5fc5\u8981\u7684\u6587\u4ef6\u3002\u6309\u7167\u5c4f\u5e55\u4e0a\u7684\u8bf4\u660e\u5b8c\u6210\u6d41\u7a0b\u3002\n\n## \u8d21\u732e\n\n\u6b22\u8fce\u4e3a Pyproject Creator \u505a\u51fa\u8d21\u732e\uff01\u5982\u679c\u60a8\u9047\u5230\u4efb\u4f55\u95ee\u9898\u6216\u6709\u6539\u8fdb\u5efa\u8bae\uff0c\u8bf7\u968f\u65f6\u5728 [GitHub \u4ed3\u5e93](https://github.com/atiasn/pyproject-creator) \u4e0a\u63d0\u51fa\u95ee\u9898\u6216\u63d0\u4ea4\u62c9\u53d6\u8bf7\u6c42\u3002\n\n## \u8bb8\u53ef\u8bc1\n\n\u672c\u9879\u76ee\u91c7\u7528 MIT \u8bb8\u53ef\u8bc1\u6388\u6743\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 [LICENSE](LICENSE) \u6587\u4ef6\u3002\n\n---\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool to create Python project templates",
    "version": "0.4.1",
    "project_urls": {
        "Homepage": "https://github.com/atiasn/pyproject-creator",
        "Repository": "https://github.com/atiasn/pyproject-creator"
    },
    "split_keywords": [
        "packaging",
        " pyproject-creator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4240537c22ae487c36cc1cd9f8c9be96d9c4c48099a9bf4123f7edb9ae0c8d5f",
                "md5": "0472f74876e884a95d51f17638d3f1d4",
                "sha256": "988e119a547d42de30575245f320ca892ea87e20068332c045a5dd8b36f45525"
            },
            "downloads": -1,
            "filename": "pyproject_creator-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0472f74876e884a95d51f17638d3f1d4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 17686,
            "upload_time": "2024-06-12T08:51:46",
            "upload_time_iso_8601": "2024-06-12T08:51:46.985142Z",
            "url": "https://files.pythonhosted.org/packages/42/40/537c22ae487c36cc1cd9f8c9be96d9c4c48099a9bf4123f7edb9ae0c8d5f/pyproject_creator-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8b9feb25d6db4ec20330c00f207386fe761b70a17e8fb69f9638e98227fa041",
                "md5": "29b57e47bb718b6ec00b99b07a7c9ec8",
                "sha256": "0fc9cd75a046dca97e9878f51f48aa9f392783b18db41f8c0652c365c1023158"
            },
            "downloads": -1,
            "filename": "pyproject_creator-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "29b57e47bb718b6ec00b99b07a7c9ec8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 15605,
            "upload_time": "2024-06-12T08:51:49",
            "upload_time_iso_8601": "2024-06-12T08:51:49.619995Z",
            "url": "https://files.pythonhosted.org/packages/a8/b9/feb25d6db4ec20330c00f207386fe761b70a17e8fb69f9638e98227fa041/pyproject_creator-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-12 08:51:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "atiasn",
    "github_project": "pyproject-creator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyproject-creator"
}
        
Elapsed time: 0.45101s