A Python project initializer.
Project description
ppinit - Python Project Initializer ⚡
A command-line tool to quickly initialize a new Python project structure with common boilerplate files and optional features like virtual environment creation, Git repository initialization, and license generation.
Developed by: Ritesh Karmakar (riteshkarmakar7407@gmail.com)
Features
- Project Structure: Creates a standard project layout (e.g.,
src/directory,__init__.py). - Essential Files: Generates
.gitignore,requirements.txt, and a basicsrc/main.py. pyproject.toml: Creates a PEP compliantpyproject.tomlfile with project metadata (optional).- Virtual Environment: Option to create a dedicated virtual environment (
venv) and install dependencies into it. - Dependency Management: Installs specified dependencies using
pip. - License Generation: Automatically adds a LICENSE file.
- Git Integration: Option to initialize a new Git repository (
git init). - README Generation: Creates a basic
README.mdfile (optional). - Customizable: Configure project name, version, description, author details, Python requirement, and more via command-line arguments.
Installation
From PyPI (Recommended):
pip install ppinit
From Source (for development):
git clone https://github.com/riteshkarmakar/ppinit.git
cd ppinit
pip install -e .
Usage
The basic command requires only the project name:
ppinit <your_project_name>
Example:
ppinit my_awesome_project
This will create a directory named my_awesome_project with the default settings.
Using Options:
You can customize the initialization using various flags:
ppinit my_cool_app \
--version "1.0.0" \
--desc "A really cool application" \
--req-py "3.9" \
--author "Ritesh Karmakar" \
--email "riteshkarmakar7407@gmail.com" \
--license "GPL-3.0" \
--deps "requests flask" \
--venv \
--git
This command will:
- Create a project named
my_cool_app. - Set the version to
1.0.0and add a description inpyproject.toml. - Specify Python
>=3.9is required. - Set the
authorandemail. - Add a
GPL-3.0license file. - Create a
requirements.txtwithrequestsabdflask. - Create a virtual environment (
venv/) and install the dependencies into it. - Initialize a Git repository (
.git/) in the project directory. - Create
pyproject.tomlandREADME.md(as these are default unless--no-tomlor--no-readmeis specified).
Command-line Options:
name: (Required) The name of the project directory to create.--version: Project version (default: 0.1.0).--desc: Project description (default: "").--req-py: Minimum required Python version (default: 3.10).--author: Author's name (default: "" - uses "Your Name" in LICENSE if not provided).--email: Author's email (default: "").--license: Choose a license to add: MIT, Apache-2.0, AGPL-3.0, GPL-3.0 (default: None).--deps: Space-separated list of dependencies to install (default: "").--venv: Create a virtual environment (venv/).--git: Initialize a Git repository.--no-toml: Skip creating the pyproject.toml file.--no-readme: Skip creating the README.md file.
Contributing
Contributions are welcome! If you have suggestions or find a bug, please open an issue on the GitHub repository. If you want to contribute code:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/your-feature-name). - Open a Pull Request.
License
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
Project Link: https://github.com/riteshkarmakar/ppinit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ppinit-0.3.0.tar.gz.
File metadata
- Download URL: ppinit-0.3.0.tar.gz
- Upload date:
- Size: 48.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8851139843bc593a59cece2ce20fcf3ed28423183d8a4fb81a6b5d44bb1c5395
|
|
| MD5 |
836b1387689d245a039e170bd3240d2a
|
|
| BLAKE2b-256 |
49f2ea6bdc3691e58e687e95d488abc0b07c5d61f79dcd6e197b5f5bb90d94c1
|
File details
Details for the file ppinit-0.3.0-py3-none-any.whl.
File metadata
- Download URL: ppinit-0.3.0-py3-none-any.whl
- Upload date:
- Size: 49.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ea22806d55d36855aefea50f799649c8545f3cd4c70e0d3dd42940e331fbcef
|
|
| MD5 |
9748b0f8dad192a48b848627e40bedf2
|
|
| BLAKE2b-256 |
2ab6645768d1aa2bce8eede1c418dbcebfe11c4dbdb2586a84fda4df73941e3d
|