Package: ppieces
Latest VersionDownloadsTestsppiecesWhat?Python Project Creator Script -> PPCS -> PythonPieCeS -> ppiecesppiecesis a command-line utility designed to streamline the setup of new Python projects.
It automates various tasks such as creating project directories, initializing git repositories, setting up virtual environments, handling requirements (with or without pip-tools) and installing pre-commit hooks.Why?I tend to always have a python project or two on the go, usually for my own benefit, little scripts to make my day to day easier/faster/automated or just learning new things or experimenting with ideas.Because of that I found myself repeating the same steps over and over again when setting up new Python projects.Same song & dance.I wanted a way to automate the setup for new projects, so I createdppieces.InstallationPlug & Play:# Install via pipx, recommended since you will most likely want to use this tool globally.pipxinstallppieces# Install via pip, if you prefer to use a virtual environment.pipinstallppiecesInstall for development:Clone the repository:gitclonehttps://github.com/patillacode/ppieces.gitcdppiecesInstall the dependencies and the package:makeinstall# or manually:python-mvenvvenvsourcevenv/bin/activate
pipinstall-e.System RequirementsBefore usingppieces, ensure you have the following installed:Python >=3.10Optional:pre-commit(can be installed viapipxorHomebrew- seeherefor more details)autoenv(optional for auto-activation of virtual environments - seeherefor more details)Usageppiecescan be used in an interactive mode (by default) or with command-line options for scripting:Interactive mode will ask you a series of questions to configure your new project.$ppieceshttps://github.com/patillacode/ppieces/assets/10074977/0a4b4dda-4809-4248-8215-7d4fb0765546For scripting, use the following options:$ppieces--help

Usage:ppieces[OPTIONS]Options:-ni,--non-interactiveRunthescriptinnon-interactivemode.-f,--project-folderPATHThepathtoyourprojectsfolder.-n,--project-nameTEXTThenameofthenewproject.-v,--virtual-envCreateavirtualenvironment.-g,--gitInitializeagitrepository(with.gitignoreandREADMEfiles)-c,--pre-commitAddpre-commitconfiguration.-r,--ruffAddaruffconfigurationfile.-a,--autoenvSetupautoenv.-m,--makefileAddadefaultMakefile.-p,--pip-toolsAddadefaultpip-toolssetups.-u,--usernameTEXTGitHubusernametouseinREADME(default:$USER)--versionShowtheversionofppieces.--helpShowthismessageandexit.Example usage:ppieces-ni-p/home/user/projects-nmy_new_project-umy_github_username-mcragvpFeaturesProject Directory Creation: Automatically creates a new directory for your project.Git Repository Initialization: Initializes a new git repository in the project directory.Virtual Environment: Sets up a Python virtual environment within the project.autoenv Setup: Configures autoenv to automatically activate the virtual environment when entering the project directory.ruff Configuration: Adds a default.ruff.tomlconfiguration file for the Ruff static analysis tool.Makefile: Adds a defaultMakefilefor common tasks like installing or running the project.pip-Tools: Adds a defaultrequirementsfolder with all the.indefault requirements files and generatesrequirements.txtfile for managing project dependencies with pip-tools.pre-commit Hooks: Installs pre-commit hooks to ensure code quality and standards are maintained.Template Files: Provides template files like.gitignore,requirements.txt, and.pre-commit-config.yamlto get started quickly.AcknowledgmentsThis project makes use of several open-source packages including, but not limited to:autoenvbamphatchicecreampip-toolspre-commitpyfigletrichtermcolorA big thank you to the maintainers of all these projects and the python and open-source communities in general.ContributingContributions are welcome!If you have a feature request, bug report, or a pull request, please open an issue or submit a PR.Licenseppiecesis released under the MIT License. See the LICENSE file for more details.