py-setenv 1.1.0

Creator: railscoder56

Last updated:

Add to Cart

Description:

pysetenv 1.1.0

About
Command Line Application and Python Package to Add/Append/Remove environment variables on Windows systems
Current package allows to precisely control and differentiate user and system variables
Table of Contents

Installation
CLI

Get variable
Create/Replace variable
Append to existing variable
Delete variable
List all variables


Python Package

Get variable
Create/Replace variable
Append to existing variable
Delete variable
List all variables



Installation
To install the package you need to run
python -m pip install py-setenv

How to use as CLI application
Get variable (CLI)
Get value of variable my_var
:: User environment
setenv my_var -u
:: System environment
setenv my_var

Create/replace variable (CLI)
Set variable my_var to 1
:: User environment
setenv my_var -v 1 -u

:: System environment
setenv my_var -v 1

Append to existing variable (CLI)
Append my/test/dir to path variable
:: User environment
setenv path -v my/test/dir -a -u

:: System environment
setenv path -v my/test/dir -a

Delete variable (CLI)
Delete variable my_var
:: User environment
setenv my_var -d -u

:: System environment
setenv my_var -d

List all variables (CLI)
Lists all variables
:: User environment
setenv -l

:: System environment
setenv -l

How to use as Python package
Get variable
Get value of variable my_var
from py_setenv import setenv
setenv("my_var")

Create/replace variable
Set variable my_var to 1
from py_setenv import setenv
setenv("my_var", value=1, user=True)

Append to existing variable
Append my/test/dir to path variable
from py_setenv import setenv
setenv("path", value="my/test/dir", append=True, user=True)

Delete variable
Delete variable my_var
from py_setenv import setenv
setenv("my_var", delete=True, user=True)

List all variables
Lists all variables
from py_setenv import setenv
setenv(list_all=True)

# to suppress echo to console
setenv(list_all=True, suppress_echo=True)

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.