Run scripts easily...
Project description
Welcome to PSM
What is PSM?
PSM (Python Script Manager) is a script manager for Python programming language. You can manage your scripts with this tool. You can create scripts, use them, delete them and etc. PSM gives you chance to call longer commands with shorter commands. I inspired by npm scripts to make Python version of it. Check out New features or Contribution documentation
Installation
For install PSM you will need pip. I you have not click here After installing pip, enter command below.
pip3 install python-script-manager
To make sure you have successfully installed it,
psm
Usage
First you need to initialize PSM in your directory.
psm init
You can also start with template.
Available templates:
- blank
- django
- flaskmng
- pypi
Example,
psm init -t django
# or
psm init --template="django"
It will create psm.json
which keeps your script informations.
Create Script
To create script, use add
command.
psm add
It will ask you name, command and description (optional) for your script. You can also pass them as options
psm add --name="Name of script" --command="Command" --description="Description for script (optional)"
List scripts
To get list of scripts, enter command below:
psm list
Run scripts
To run scripts use syntax below:
psm run [SCRIPT_NAME]
Remove script
If you want to remove unused scripts, enter command below:
psm rm -n [SCRIPT_NAME]
Special scripts
If you name a script which is in list below, you can use special script feature.
List of special scripts:
- start
- deploy
- build
To run special scripts, use syntaxt below:
psm SPECIAL_SCRIPT
Example,
psm build
PIP shortcuts
To install dependencies in requirements.txt
, use
psm install
Or you can output dependencies to requirements.txt
psm freeze
Project settings
Setting version
Optionally, you can define version for your project. If you are building python package, it is useful for versioning. To set new version:
psm setv
# or
psm set-version
It will not change, if you do not enter any value to input.
To use version in setup.py
for your packages, you can use PSMReader
object.
from python_script_manager.package import PSMReader
psm = PSMReader('directory of psm.json')
# in most cases, "psm.json" will work as directory
setuptools.setup(
# ...
version=psm.get_version(),
# ...
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
Hashes for python-script-manager-1.1.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c5896019c4db699890ee8ac250d57cc70c93ad24d6ee1d1943663e0a518f12f |
|
MD5 | 966ab763e38f3b17da8fad9dc17b3ac7 |
|
BLAKE2b-256 | 1e3b010d3b06d065283b445f23438eb9a4d2054f6a69691b82d9b42a9e3c5872 |
Hashes for python_script_manager-1.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9756c3264447b3948653dbf81bd5310f4fe7fbdd8c4ede4a9f924ae7e654b746 |
|
MD5 | 49f0b83f2007a11eb6945775dac11607 |
|
BLAKE2b-256 | 55bce7eed233a030b303eea9fd747ceb473e4d34cccb7bca662a414024483f30 |