pvw


Namepvw JSON
Version 0.0.8 PyPI version JSON
download
home_page
Summarya lightweight python venv wrapper to manage venvs
upload_time2023-11-04 04:27:11
maintainer
docs_urlNone
author
requires_python>=3.6
licenseMIT
keywords venv virtual env python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pvw

A lightweight (~10kB) python venv wrapper for virtual environment management.

Create venv or standard project in simple command line tool.

Based on the built-in venv since python 3.6.

![](screenshot.png)

## Pre-requirement

- Python >= 3.6
- python-venv

## Installation

```
pip install pvw
```
## Usage

You can either start a raw project with `pvw init`, or just manage virtual envs with **core commands** .

### Start a project

```bash
pvw init PROJ_NAME
```

Initialize a python project, with a simple template as:

```
|- pyproject.toml
|- src
    |- PROJ_NAME
          |- cli.py
|- README.md
|- License
```

You can decide whether creating a specific env for this project.

### Configuration

Get or set the directory `venv_path` where venvs are stored in default.

```bash
pvw config get venv_path # get venv_path variable
pvw config set venv_path=PATH/TO/VENV # set venv_path
```

### Core commands

We use `base` as a demo

#### Show

```shell
# show name, path, and size(optional) of existing venvs.
> pvw ls [--show-size]

Name   Path                  Size
--------------------------------------
env1   C:\Users\venvs\env1   199.42MB
env2   C:\Users\venvs\env2   21.83MB
st     C:\Users\venvs\st     313.99MB
v2     C:\Users\venvs\v2     21.86MB
v3     C:\Users\venvs\v3     21.85MB
```

#### Create
```bash
# Create venv `base` in either way:
pvw create base  # in default venv path
pvw create ./base  # in current directory
pvw create /home/venvs/base  # in specific directory
```

#### Activate/deactivate
```powershell
# For Windows
pvw activate base  # standard way
pvw base  # or a shorter way

deactivate  # exit
```

```shell
# For Linux/MacOS
source pvw activate base  # standard way
source pvw base  # or a shorter way

deactivate # exit
```

#### Copy or move

```shell
# copy or rename from a existing venv
pvw cp base dev  # copy `base` to a new venv `dev`
pvw mv dev foo  # rename `dev` to a new venv `foo`
```

#### Remove

```shell
# remove both `dev` and `foo`
pvw rm dev foo
# remove envs that starts with `test`
pvw rm test.*
```

## Build From Source

### Using Makefile

```bash
cd src/pvw
make
sudo make install
```
The executable binary `pvw` and `pvw_py` will be installed in your /usr/bin/ directory.

### Using setuptools

```bash
pip install --upgrade build setuptools # skip if already installed
python -m build
pip install dist/pvw-x.x.x.tar.gz # x.x.x is the built version of pvw
```

## To-do list

- Simplify activate command in Linux/Mac OS
- Enable setting default venv in terminal
- Add unit tests
- Support specific python version (if installed)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pvw",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "venv,virtual env,python",
    "author": "",
    "author_email": "Hagemon <ooonefolder@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c5/0b/f7c5a54dbc7e1b302ed3f569615fc3ca8746f59f74e5473e01c93b12daba/pvw-0.0.8.tar.gz",
    "platform": null,
    "description": "# pvw\n\nA lightweight (~10kB) python venv wrapper for virtual environment management.\n\nCreate venv or standard project in simple command line tool.\n\nBased on the built-in venv since python 3.6.\n\n![](screenshot.png)\n\n## Pre-requirement\n\n- Python >= 3.6\n- python-venv\n\n## Installation\n\n```\npip install pvw\n```\n## Usage\n\nYou can either start a raw project with `pvw init`, or just manage virtual envs with **core commands** .\n\n### Start a project\n\n```bash\npvw init PROJ_NAME\n```\n\nInitialize a python project, with a simple template as:\n\n```\n|- pyproject.toml\n|- src\n    |- PROJ_NAME\n          |- cli.py\n|- README.md\n|- License\n```\n\nYou can decide whether creating a specific env for this project.\n\n### Configuration\n\nGet or set the directory `venv_path` where venvs are stored in default.\n\n```bash\npvw config get venv_path # get venv_path variable\npvw config set venv_path=PATH/TO/VENV # set venv_path\n```\n\n### Core commands\n\nWe use `base` as a demo\n\n#### Show\n\n```shell\n# show name, path, and size(optional) of existing venvs.\n> pvw ls [--show-size]\n\nName   Path                  Size\n--------------------------------------\nenv1   C:\\Users\\venvs\\env1   199.42MB\nenv2   C:\\Users\\venvs\\env2   21.83MB\nst     C:\\Users\\venvs\\st     313.99MB\nv2     C:\\Users\\venvs\\v2     21.86MB\nv3     C:\\Users\\venvs\\v3     21.85MB\n```\n\n#### Create\n```bash\n# Create venv `base` in either way:\npvw create base  # in default venv path\npvw create ./base  # in current directory\npvw create /home/venvs/base  # in specific directory\n```\n\n#### Activate/deactivate\n```powershell\n# For Windows\npvw activate base  # standard way\npvw base  # or a shorter way\n\ndeactivate  # exit\n```\n\n```shell\n# For Linux/MacOS\nsource pvw activate base  # standard way\nsource pvw base  # or a shorter way\n\ndeactivate # exit\n```\n\n#### Copy or move\n\n```shell\n# copy or rename from a existing venv\npvw cp base dev  # copy `base` to a new venv `dev`\npvw mv dev foo  # rename `dev` to a new venv `foo`\n```\n\n#### Remove\n\n```shell\n# remove both `dev` and `foo`\npvw rm dev foo\n# remove envs that starts with `test`\npvw rm test.*\n```\n\n## Build From Source\n\n### Using Makefile\n\n```bash\ncd src/pvw\nmake\nsudo make install\n```\nThe executable binary `pvw` and `pvw_py` will be installed in your /usr/bin/ directory.\n\n### Using setuptools\n\n```bash\npip install --upgrade build setuptools # skip if already installed\npython -m build\npip install dist/pvw-x.x.x.tar.gz # x.x.x is the built version of pvw\n```\n\n## To-do list\n\n- Simplify activate command in Linux/Mac OS\n- Enable setting default venv in terminal\n- Add unit tests\n- Support specific python version (if installed)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "a lightweight python venv wrapper to manage venvs",
    "version": "0.0.8",
    "project_urls": {
        "Documentation": "https://github.com/hagemon/pvw",
        "Homepage": "https://github.com/hagemon/pvw",
        "Repository": "https://github.com/hagemon/pvw"
    },
    "split_keywords": [
        "venv",
        "virtual env",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26bf2d5af975921352ec055698a9640ca7d86895539b73de6050d4d58160cdeb",
                "md5": "f64bdecce31811453041862fe1d63d76",
                "sha256": "5a1fc397e51e78228dadd29a4976aa638ecd2f5104cadea40af88904fbd7aa12"
            },
            "downloads": -1,
            "filename": "pvw-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f64bdecce31811453041862fe1d63d76",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 12783,
            "upload_time": "2023-11-04T04:27:09",
            "upload_time_iso_8601": "2023-11-04T04:27:09.887921Z",
            "url": "https://files.pythonhosted.org/packages/26/bf/2d5af975921352ec055698a9640ca7d86895539b73de6050d4d58160cdeb/pvw-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c50bf7c5a54dbc7e1b302ed3f569615fc3ca8746f59f74e5473e01c93b12daba",
                "md5": "6680f8550d802dd0d93ccd6d5dc97841",
                "sha256": "8e5e6491fab8144f0810328facdd91e5fb6862fcae028b675c8ab4ab7e5818b6"
            },
            "downloads": -1,
            "filename": "pvw-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "6680f8550d802dd0d93ccd6d5dc97841",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 11822,
            "upload_time": "2023-11-04T04:27:11",
            "upload_time_iso_8601": "2023-11-04T04:27:11.629264Z",
            "url": "https://files.pythonhosted.org/packages/c5/0b/f7c5a54dbc7e1b302ed3f569615fc3ca8746f59f74e5473e01c93b12daba/pvw-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-04 04:27:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hagemon",
    "github_project": "pvw",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pvw"
}
        
Elapsed time: 0.13510s