A Python project manager.
Project description
ppm Package
ppm is a Python Project Manager CLI tool that simplifies project setup, dependency management, environment configuration, and running project commands. This tool is ideal for developers looking for a structured and efficient way to manage project dependencies, execute scripts, and configure environment variables directly from the command line.
Overview
The ppm tool provides a convenient set of commands for Python project management, enabling you to:
- Initialize Projects: Set up a new project structure with a default or custom configuration.
- Install and Uninstall Packages: Add or remove Python packages as needed for your project.
- Manage Environment Variables: Easily configure environment variables for your project.
- Run Project Scripts: Execute project-specific scripts or commands from a customizable list.
The ppm CLI is designed to streamline project management, reducing setup time and effort so that you can focus on coding.
Installation
To install ppm, clone the repository and run:
pip install .
Usage
Use the ppm command followed by any of the subcommands listed below to manage various aspects of your project.
ppm <command> [options]
Important Notes
-
Using
ppmas a Dependency Manager: If you choose to useppmas your dependency manager, be sure to specify a run script (e.g., a Python filename or any other command you wish to execute) in the configuration file. Without this, theruncommand will throw an error as it will not have a script to execute. -
Using
ppmon an Existing Project: If you’re applyingppmto an existing project, specifyppmas the dependency manager when runningppm init. This setup will integrateppmas the dependency manager for your project.
Commands
1. init
Initializes a new project configuration with an optional default setting.
Usage:
ppm init
Options:
-d: Enable default configuration.
Example:
ppm init -d
This command initializes the project using default configuration settings.
2. install
Installs specified packages in the project.
Usage:
ppm install <package1> <package2> ...
Example:
ppm install requests flask
This command installs the requests and flask packages in your project.
3. uninstall
Uninstalls specified packages from the project, with an option to include dependencies.
Usage:
ppm uninstall <package1> <package2> ...
Options:
-d: Uninstall packages along with their dependencies.
Example:
ppm uninstall requests -d
This command uninstalls the requests package and any dependencies.
4. run
Runs the project’s default or specified command.
Usage:
ppm run [command_name]
- If you specify a command name (e.g.,
ppm run hello), it will execute the corresponding command defined in the configuration file. - If no command name is provided (i.e.,
ppm run), the default command will run.
Examples:
-
Setting Up Custom Commands:
Suppose you define a command in your configuration file:
hello = "python hello.py"
You can run this command with:
ppm run hello
-
Running the Default Command:
If you want to run the default command specified in your configuration file, simply use:
ppm run
5. add_env
Adds key-value pairs to the project’s .env file.
Usage:
ppm add_env <KEY=VALUE> <KEY2=VALUE2> ...
Example:
ppm add_env DATABASE_URL=mysql://user:password@localhost/dbname SECRET_KEY=your_secret_key
This command adds the specified environment variables to the .env file.
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 ppm3-0.0.7.tar.gz.
File metadata
- Download URL: ppm3-0.0.7.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93cce67044dc1f3e45688536de00633f766fdf0902910cce53c3094e948e3c16
|
|
| MD5 |
ded18cf58cb03ac6263594d5c85681d9
|
|
| BLAKE2b-256 |
2789b3c6fff6fef0fb0dda5681381093744e7014f1b2b5d038ce62b01a0b6ce6
|
File details
Details for the file ppm3-0.0.7-py3-none-any.whl.
File metadata
- Download URL: ppm3-0.0.7-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0bd7ae5bf561415a8b7799871b2587c5ddf9814339c6f27695dee2ae88a5492
|
|
| MD5 |
73caf4524fd2b5c1667dc12c21e3275a
|
|
| BLAKE2b-256 |
81ac5ca2760b149553e662ad14cc78eaa9833c358eb5b3008ab3536e2923cb89
|