pyproject-init


Namepyproject-init JSON
Version 1.1.0 PyPI version JSON
download
home_page
SummaryA tool to initialize a python project with all basic files and configurations
upload_time2024-03-16 22:01:48
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2024 Quentin Haenn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords project project init python project python project init
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PYPROJECT_INIT, the python project initializer

This is a simple python project initializer. It creates any file and directory structure needed for a python project, depending on the options you provide.

## ROADMAP

- [x] add function for creating the chosen license file
- [x] add function for creating the chosen gitignore file
- [x] add function for creating the chosen README file
- [x] modify each os.system() call to use the subprocess module
- [x] wrap the whole thing in a class
- [x] simplify entry point
- [x] add tests
- [ ] add documentation
- [x] add pyproject.toml file
- [x] wrap the whole thing in a package
- [x] publish the package on pypi
- [x] add a command line interface
- [x] test it vanilla
- [x] Change options setuppy and setupcfg to setup
- [x] Change options pyproject to make setup a flag. If setup is true, then create setup.py and setup.cfg. If setup is false, then create pyproject.toml
- [ ] Cut the code into smaller functions if possible


## DESCRIPTION

This package is a simple python project initializer. It creates a directory structure and files for a python project, depending on the options you provide. It can create a directory structure for a simple python project, a python package, or a python package with a CLI. It embeds:

- a license file, default containing the MIT license but can be changed to any other license that is available on the [choosealicense.com](https://choosealicense.com) website
- a gitignore file, default containing the standard python gitignore fields
- a README file, default containing a simple template that you can modify
- a pyproject.toml file, default containing the standard fields for a python package. This file is only created if you choose to create a python package or a python app.
- a setup.cfg file, default containing the standard fields for a python package. This file is only created if you choose to create a python package or a python app.
- a setup.py file, default containing the standard fields for a python package. This file is only created if you choose to create a python package or a python app.
- a directory structure, default containing a simple python package with a simple module and a simple test module. This directory structure is only created if you choose to create a python package or a python app. The directory structure is composed of a package directory, a test directory, every `__init__.py` file needed, and a simple module and a simple test module.
- If needed, this package can also create a simple Dockerfile that you can use to containerize your python app.

> [!NOTE]
> The `pyproject.toml`,`setup.cfg`, and `setup.py` files are optional and cannot be created together. If you choose to use a `pyproject.toml` project file (which is the new standard for python projects), the other two files will not be created. If you choose to use a `setup.cfg` file, the `setup.py` file will be created and not the `pyproject.toml` file.

## INSTALLATION

You can either clone the repository and install the package from the source code, or you can install it from pypi.

```bash
pip install pyproject-init
```

> [!NOTE]
> Note that the new recommended way to use and install packages is to use virtual environments, so you might want to create one before installing the package.

## USAGE

The package provide a command line interface with 2 main commands: `lib` and `app`. The `lib` command is used to create a simple python package, and the `app` command is used to create a python package with a CLI. Each of the commands has same options and arguments. Please refer to the help message or the documentation for more information.

```bash
pyproject-init lib --help
```

```bash
pyproject-init app --help
```

## EXAMPLES

Here are some examples of how to use the package.

### Create a simple python package

```bash
pyproject-init lib my_package
```

This will create a directory structure and files for a simple python package. The directory structure will look like this:

```bash
my_package/
    my_package/
        __init__.py
    tests/
        __init__.py
        test_my_package.py
    LICENSE
    .gitignore
    README.md
    pyproject.toml
    setup.cfg
    setup.py
```

### Create a python package with git initialized

This command line will create a simple python package and initialize a git repository in the directory.

```bash
pyproject-init lib my_package --git
```

### Create a python package with a Dockerfile

This command line will create a simple python package and a Dockerfile in the directory.

```bash
pyproject-init lib my_package --docker
```

### Create a python package with a different license

This command line will create a simple python package with a different license. The license must be available on the [choosealicense.com](https://choosealicense.com) website.

```bash
pyproject-init lib my_package --license gpl-3.0
```

### Create a python package with pyproject.toml

This command line will create a simple python package with a `pyproject.toml` file instead of the `setup.cfg` and `setup.py` files.

```bash
pyproject-init lib my_package --pyproject
```

### Create a python package with

## CONTRIBUTING

If you want to contribute to this project, you can either open an issue or a pull request. Please refer to the CONTRIBUTING.md file for more information.

## LICENSE

This project is licensed under the MIT license. Please refer to the [LICENSE](./LICENSE) file for more information.

## AUTHOR

This project was created by Quentin Haenn. You can contact me at [quentin.haenn.pro@gmail.com](mailto:quentin.haenn.pro@gmail.com?subject=pyproject-init).
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyproject-init",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Quentin Haenn <quentin.haenn.pro@gmail.com>",
    "keywords": "project,project init,python project,python project init",
    "author": "",
    "author_email": "Quentin Haenn <quentin.haenn.pro@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0e/8d/64694fb9465e76a4a4a385c12452dc9e2a424cb8e4570a423e4c3b0404e3/pyproject_init-1.1.0.tar.gz",
    "platform": null,
    "description": "# PYPROJECT_INIT, the python project initializer\n\nThis is a simple python project initializer. It creates any file and directory structure needed for a python project, depending on the options you provide.\n\n## ROADMAP\n\n- [x] add function for creating the chosen license file\n- [x] add function for creating the chosen gitignore file\n- [x] add function for creating the chosen README file\n- [x] modify each os.system() call to use the subprocess module\n- [x] wrap the whole thing in a class\n- [x] simplify entry point\n- [x] add tests\n- [ ] add documentation\n- [x] add pyproject.toml file\n- [x] wrap the whole thing in a package\n- [x] publish the package on pypi\n- [x] add a command line interface\n- [x] test it vanilla\n- [x] Change options setuppy and setupcfg to setup\n- [x] Change options pyproject to make setup a flag. If setup is true, then create setup.py and setup.cfg. If setup is false, then create pyproject.toml\n- [ ] Cut the code into smaller functions if possible\n\n\n## DESCRIPTION\n\nThis package is a simple python project initializer. It creates a directory structure and files for a python project, depending on the options you provide. It can create a directory structure for a simple python project, a python package, or a python package with a CLI. It embeds:\n\n- a license file, default containing the MIT license but can be changed to any other license that is available on the [choosealicense.com](https://choosealicense.com) website\n- a gitignore file, default containing the standard python gitignore fields\n- a README file, default containing a simple template that you can modify\n- a pyproject.toml file, default containing the standard fields for a python package. This file is only created if you choose to create a python package or a python app.\n- a setup.cfg file, default containing the standard fields for a python package. This file is only created if you choose to create a python package or a python app.\n- a setup.py file, default containing the standard fields for a python package. This file is only created if you choose to create a python package or a python app.\n- a directory structure, default containing a simple python package with a simple module and a simple test module. This directory structure is only created if you choose to create a python package or a python app. The directory structure is composed of a package directory, a test directory, every `__init__.py` file needed, and a simple module and a simple test module.\n- If needed, this package can also create a simple Dockerfile that you can use to containerize your python app.\n\n> [!NOTE]\n> The `pyproject.toml`,`setup.cfg`, and `setup.py` files are optional and cannot be created together. If you choose to use a `pyproject.toml` project file (which is the new standard for python projects), the other two files will not be created. If you choose to use a `setup.cfg` file, the `setup.py` file will be created and not the `pyproject.toml` file.\n\n## INSTALLATION\n\nYou can either clone the repository and install the package from the source code, or you can install it from pypi.\n\n```bash\npip install pyproject-init\n```\n\n> [!NOTE]\n> Note that the new recommended way to use and install packages is to use virtual environments, so you might want to create one before installing the package.\n\n## USAGE\n\nThe package provide a command line interface with 2 main commands: `lib` and `app`. The `lib` command is used to create a simple python package, and the `app` command is used to create a python package with a CLI. Each of the commands has same options and arguments. Please refer to the help message or the documentation for more information.\n\n```bash\npyproject-init lib --help\n```\n\n```bash\npyproject-init app --help\n```\n\n## EXAMPLES\n\nHere are some examples of how to use the package.\n\n### Create a simple python package\n\n```bash\npyproject-init lib my_package\n```\n\nThis will create a directory structure and files for a simple python package. The directory structure will look like this:\n\n```bash\nmy_package/\n    my_package/\n        __init__.py\n    tests/\n        __init__.py\n        test_my_package.py\n    LICENSE\n    .gitignore\n    README.md\n    pyproject.toml\n    setup.cfg\n    setup.py\n```\n\n### Create a python package with git initialized\n\nThis command line will create a simple python package and initialize a git repository in the directory.\n\n```bash\npyproject-init lib my_package --git\n```\n\n### Create a python package with a Dockerfile\n\nThis command line will create a simple python package and a Dockerfile in the directory.\n\n```bash\npyproject-init lib my_package --docker\n```\n\n### Create a python package with a different license\n\nThis command line will create a simple python package with a different license. The license must be available on the [choosealicense.com](https://choosealicense.com) website.\n\n```bash\npyproject-init lib my_package --license gpl-3.0\n```\n\n### Create a python package with pyproject.toml\n\nThis command line will create a simple python package with a `pyproject.toml` file instead of the `setup.cfg` and `setup.py` files.\n\n```bash\npyproject-init lib my_package --pyproject\n```\n\n### Create a python package with\n\n## CONTRIBUTING\n\nIf you want to contribute to this project, you can either open an issue or a pull request. Please refer to the CONTRIBUTING.md file for more information.\n\n## LICENSE\n\nThis project is licensed under the MIT license. Please refer to the [LICENSE](./LICENSE) file for more information.\n\n## AUTHOR\n\nThis project was created by Quentin Haenn. You can contact me at [quentin.haenn.pro@gmail.com](mailto:quentin.haenn.pro@gmail.com?subject=pyproject-init).",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Quentin Haenn  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A tool to initialize a python project with all basic files and configurations",
    "version": "1.1.0",
    "project_urls": {
        "Repository": "https://github.com/quentinhaenn/pyproject_init"
    },
    "split_keywords": [
        "project",
        "project init",
        "python project",
        "python project init"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f7ddf30362ae103c9aa1b83c4e23702c8d2a76221ede71756484143304ad198",
                "md5": "becfcccc9f7f2179a9f4538b989d686e",
                "sha256": "502a609913987241990ee13835cd94c0947d0d87c7243d53ba8aff0f271bc915"
            },
            "downloads": -1,
            "filename": "pyproject_init-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "becfcccc9f7f2179a9f4538b989d686e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 9062,
            "upload_time": "2024-03-16T22:01:47",
            "upload_time_iso_8601": "2024-03-16T22:01:47.475149Z",
            "url": "https://files.pythonhosted.org/packages/3f/7d/df30362ae103c9aa1b83c4e23702c8d2a76221ede71756484143304ad198/pyproject_init-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e8d64694fb9465e76a4a4a385c12452dc9e2a424cb8e4570a423e4c3b0404e3",
                "md5": "c140f1f350be8792936c4e478a48087e",
                "sha256": "5ac0506c862fd1649c1f64b482c77428473a7df9ef77a1295f899685f0d261a0"
            },
            "downloads": -1,
            "filename": "pyproject_init-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c140f1f350be8792936c4e478a48087e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9319,
            "upload_time": "2024-03-16T22:01:48",
            "upload_time_iso_8601": "2024-03-16T22:01:48.968436Z",
            "url": "https://files.pythonhosted.org/packages/0e/8d/64694fb9465e76a4a4a385c12452dc9e2a424cb8e4570a423e4c3b0404e3/pyproject_init-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-16 22:01:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "quentinhaenn",
    "github_project": "pyproject_init",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyproject-init"
}
        
Elapsed time: 0.20720s