ppm3


Nameppm3 JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/rahulcodepython/Python-Project-Manager.git
SummaryA Python project manager.
upload_time2024-12-11 23:59:00
maintainerNone
docs_urlNone
authorRahul Das
requires_python>=3.6
licenseNone
keywords ppm project manager python package python project manager
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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. This is all in one cli tools for long pip commands.

## 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`:

```bash
pip install ppm3
```

## Usage

Use the `ppm` command followed by any of the subcommands listed below to manage various aspects of your project.

```bash
ppm <command> [options]
```

### Important Notes

1. **Using `ppm` as a Dependency Manager**: If you choose to use `ppm` as 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, the `run` command will throw an error as it will not have a script to execute.

2. **Using `ppm` on an Existing Project**: If you’re applying `ppm` to an existing project, specify `ppm` as the dependency manager when running `ppm init`. This setup will integrate `ppm` as the dependency manager for your project.

---

### Commands

#### 1. `init`

Initializes a new project configuration with an optional default setting.

**Usage:**

```bash
ppm init
```

**Options:**

- `-d`: Enable default configuration.

**Example:**

```bash
ppm init -d
```

This command initializes the project using default configuration settings.

**On installation, you'll see the following prompts:**

Asking about how will you use ppm.

```bash
[?] How do you want to use ppm?:
   as a project manager
 > as a dependency manager
```

If you have choosen ppm as a project manager and not given the flag -d then you have to answer:

```bash
project name (system)
version (1.0.0)
description ()
entry point (main.py)
git repository ()
author ()
license (ISC)
```

You can specify required packages at the time of initialize the project.

```bash
Enter the name of the packages you want to install in the project like (<package_name>==<version>) or (<package_name>).
Packages (press Enter to end): <package1> <package2> ...
```

**Example:**

```bash
Enter the name of the packages you want to install in the project like (<package_name>==<version>) or (<package_name>).
Packages (press Enter to end): requests flask
```

This is for generating .env file.

```bash
[?] Are you sure you want to add .env file?:
   Yes
 > No
```

But if you have already .env file in your project, then you will encounter

```bash
[?] .env file already exists.:
   Overwrite
 > Keep as it is

.env file is untouched.
```

PPM will create a src folder in your root directory and inside it, it will generate a `main.py` file. If you have already this folder structure, you will be asked:

```bash
[?] Do you want to override main.py file?:
 > Yes
   No
```

#### 2. `install`

Installs specified packages in the project.

**Usage:**

```bash
ppm install <package1> <package2> ...
```

**Example:**

```bash
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:**

```bash
ppm uninstall <package1> <package2> ...
```

**Options:**

- `-d`: Uninstall packages along with their dependencies.

**Example:**

```bash
ppm uninstall requests -d
```

This command uninstalls the `requests` package and any dependencies.

#### 4. `run`

Runs the project’s default or specified command.

**Usage:**

```bash
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:**

1. **Setting Up Custom Commands**:

   Suppose you define a command in your configuration file:

   ```text
   hello = "python hello.py"
   ```

   You can run this command with:

   ```bash
   ppm run hello
   ```

2. **Running the Default Command**:

   If you want to run the default command specified in your configuration file, simply use:

   ```bash
   ppm run
   ```

#### 5. `add_env`

Adds key-value pairs to the project’s `.env` file.

**Usage:**

```bash
ppm add_env <KEY=VALUE> <KEY2=VALUE2> ...
```

**Example:**

```bash
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.

#### 6. `list`

List all packages in terminal.

**Usage:**

```bash
ppm list
```

#### 7. `freeze`

Generate `requirements.txt` file for your project packages.

**Usage:**

```bash
ppm freeze
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rahulcodepython/Python-Project-Manager.git",
    "name": "ppm3",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "ppm, project manager, python package, python project manager",
    "author": "Rahul Das",
    "author_email": "rahulcodepython@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7c/fb/548d5f353648b63a9fe2a24fca5d5e531b73c34ee03e8fbb2bbcc6000d82/ppm3-0.0.8.tar.gz",
    "platform": null,
    "description": "# ppm Package\r\n\r\n`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. This is all in one cli tools for long pip commands.\r\n\r\n## Overview\r\n\r\nThe `ppm` tool provides a convenient set of commands for Python project management, enabling you to:\r\n\r\n- **Initialize Projects**: Set up a new project structure with a default or custom configuration.\r\n- **Install and Uninstall Packages**: Add or remove Python packages as needed for your project.\r\n- **Manage Environment Variables**: Easily configure environment variables for your project.\r\n- **Run Project Scripts**: Execute project-specific scripts or commands from a customizable list.\r\n\r\nThe `ppm` CLI is designed to streamline project management, reducing setup time and effort so that you can focus on coding.\r\n\r\n## Installation\r\n\r\nTo install `ppm`:\r\n\r\n```bash\r\npip install ppm3\r\n```\r\n\r\n## Usage\r\n\r\nUse the `ppm` command followed by any of the subcommands listed below to manage various aspects of your project.\r\n\r\n```bash\r\nppm <command> [options]\r\n```\r\n\r\n### Important Notes\r\n\r\n1. **Using `ppm` as a Dependency Manager**: If you choose to use `ppm` as 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, the `run` command will throw an error as it will not have a script to execute.\r\n\r\n2. **Using `ppm` on an Existing Project**: If you\u00e2\u20ac\u2122re applying `ppm` to an existing project, specify `ppm` as the dependency manager when running `ppm init`. This setup will integrate `ppm` as the dependency manager for your project.\r\n\r\n---\r\n\r\n### Commands\r\n\r\n#### 1. `init`\r\n\r\nInitializes a new project configuration with an optional default setting.\r\n\r\n**Usage:**\r\n\r\n```bash\r\nppm init\r\n```\r\n\r\n**Options:**\r\n\r\n- `-d`: Enable default configuration.\r\n\r\n**Example:**\r\n\r\n```bash\r\nppm init -d\r\n```\r\n\r\nThis command initializes the project using default configuration settings.\r\n\r\n**On installation, you'll see the following prompts:**\r\n\r\nAsking about how will you use ppm.\r\n\r\n```bash\r\n[?] How do you want to use ppm?:\r\n   as a project manager\r\n > as a dependency manager\r\n```\r\n\r\nIf you have choosen ppm as a project manager and not given the flag -d then you have to answer:\r\n\r\n```bash\r\nproject name (system)\r\nversion (1.0.0)\r\ndescription ()\r\nentry point (main.py)\r\ngit repository ()\r\nauthor ()\r\nlicense (ISC)\r\n```\r\n\r\nYou can specify required packages at the time of initialize the project.\r\n\r\n```bash\r\nEnter the name of the packages you want to install in the project like (<package_name>==<version>) or (<package_name>).\r\nPackages (press Enter to end): <package1> <package2> ...\r\n```\r\n\r\n**Example:**\r\n\r\n```bash\r\nEnter the name of the packages you want to install in the project like (<package_name>==<version>) or (<package_name>).\r\nPackages (press Enter to end): requests flask\r\n```\r\n\r\nThis is for generating .env file.\r\n\r\n```bash\r\n[?] Are you sure you want to add .env file?:\r\n   Yes\r\n > No\r\n```\r\n\r\nBut if you have already .env file in your project, then you will encounter\r\n\r\n```bash\r\n[?] .env file already exists.:\r\n   Overwrite\r\n > Keep as it is\r\n\r\n.env file is untouched.\r\n```\r\n\r\nPPM will create a src folder in your root directory and inside it, it will generate a `main.py` file. If you have already this folder structure, you will be asked:\r\n\r\n```bash\r\n[?] Do you want to override main.py file?:\r\n > Yes\r\n   No\r\n```\r\n\r\n#### 2. `install`\r\n\r\nInstalls specified packages in the project.\r\n\r\n**Usage:**\r\n\r\n```bash\r\nppm install <package1> <package2> ...\r\n```\r\n\r\n**Example:**\r\n\r\n```bash\r\nppm install requests flask\r\n```\r\n\r\nThis command installs the `requests` and `flask` packages in your project.\r\n\r\n#### 3. `uninstall`\r\n\r\nUninstalls specified packages from the project, with an option to include dependencies.\r\n\r\n**Usage:**\r\n\r\n```bash\r\nppm uninstall <package1> <package2> ...\r\n```\r\n\r\n**Options:**\r\n\r\n- `-d`: Uninstall packages along with their dependencies.\r\n\r\n**Example:**\r\n\r\n```bash\r\nppm uninstall requests -d\r\n```\r\n\r\nThis command uninstalls the `requests` package and any dependencies.\r\n\r\n#### 4. `run`\r\n\r\nRuns the project\u00e2\u20ac\u2122s default or specified command.\r\n\r\n**Usage:**\r\n\r\n```bash\r\nppm run [command_name]\r\n```\r\n\r\n- If you specify a command name (e.g., `ppm run hello`), it will execute the corresponding command defined in the configuration file.\r\n- If no command name is provided (i.e., `ppm run`), the default command will run.\r\n\r\n**Examples:**\r\n\r\n1. **Setting Up Custom Commands**:\r\n\r\n   Suppose you define a command in your configuration file:\r\n\r\n   ```text\r\n   hello = \"python hello.py\"\r\n   ```\r\n\r\n   You can run this command with:\r\n\r\n   ```bash\r\n   ppm run hello\r\n   ```\r\n\r\n2. **Running the Default Command**:\r\n\r\n   If you want to run the default command specified in your configuration file, simply use:\r\n\r\n   ```bash\r\n   ppm run\r\n   ```\r\n\r\n#### 5. `add_env`\r\n\r\nAdds key-value pairs to the project\u00e2\u20ac\u2122s `.env` file.\r\n\r\n**Usage:**\r\n\r\n```bash\r\nppm add_env <KEY=VALUE> <KEY2=VALUE2> ...\r\n```\r\n\r\n**Example:**\r\n\r\n```bash\r\nppm add_env DATABASE_URL=mysql://user:password@localhost/dbname SECRET_KEY=your_secret_key\r\n```\r\n\r\nThis command adds the specified environment variables to the `.env` file.\r\n\r\n#### 6. `list`\r\n\r\nList all packages in terminal.\r\n\r\n**Usage:**\r\n\r\n```bash\r\nppm list\r\n```\r\n\r\n#### 7. `freeze`\r\n\r\nGenerate `requirements.txt` file for your project packages.\r\n\r\n**Usage:**\r\n\r\n```bash\r\nppm freeze\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A Python project manager.",
    "version": "0.0.8",
    "project_urls": {
        "Bug Tracker": "https://github.com/rahulcodepython/Python-Project-Manager/issues",
        "Documentation": "https://github.com/rahulcodepython/Python-Project-Manager/blob/main/ppm3/README.md",
        "Homepage": "https://github.com/rahulcodepython/Python-Project-Manager.git",
        "Source Code": "https://github.com/rahulcodepython/Python-Project-Manager"
    },
    "split_keywords": [
        "ppm",
        " project manager",
        " python package",
        " python project manager"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "47d3ed223d5a8b6e0580ffefa55a92d80311a1c5fdbb18f98c0c30760a5adb63",
                "md5": "16507cb3c9e133f11af6200279bc6e1f",
                "sha256": "4edd1c60421e12af596826f8cb321ff913b9e211499f6fe8d304c5a722fb00a6"
            },
            "downloads": -1,
            "filename": "ppm3-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "16507cb3c9e133f11af6200279bc6e1f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 13603,
            "upload_time": "2024-12-11T23:58:56",
            "upload_time_iso_8601": "2024-12-11T23:58:56.478552Z",
            "url": "https://files.pythonhosted.org/packages/47/d3/ed223d5a8b6e0580ffefa55a92d80311a1c5fdbb18f98c0c30760a5adb63/ppm3-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7cfb548d5f353648b63a9fe2a24fca5d5e531b73c34ee03e8fbb2bbcc6000d82",
                "md5": "a5c10ca0de3c865d65d0dd23167a0168",
                "sha256": "8d75c0b5fdead0b8470a57e88232a708ac9664328713283fb6b9c64072381220"
            },
            "downloads": -1,
            "filename": "ppm3-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "a5c10ca0de3c865d65d0dd23167a0168",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 12472,
            "upload_time": "2024-12-11T23:59:00",
            "upload_time_iso_8601": "2024-12-11T23:59:00.572554Z",
            "url": "https://files.pythonhosted.org/packages/7c/fb/548d5f353648b63a9fe2a24fca5d5e531b73c34ee03e8fbb2bbcc6000d82/ppm3-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-11 23:59:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rahulcodepython",
    "github_project": "Python-Project-Manager",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "ppm3"
}
        
Elapsed time: 0.84436s