Skip to main content

PySS: Python Script Support Tool

Sponsor Me! PyPI version GitHub license Downloads Downloads

PySS is a tool designed to facilitate the management and execution of pyss.yaml configurations, aimed at enhancing Python scripting workflows. It offers a straightforward command-line interface for executing scripts defined in a pyss.yaml or pyss.yml file, with capabilities for testing configurations, silent and quiet execution modes, and advanced configuration options including environment variables, custom variables, and pre/post execution scripts. The project is open-source, licensed under the MIT License, and is geared towards simplifying script execution tasks for Python developers

Installing PySS

To integrate PySS into your environment, simply run:

pip install pyss

How to Use

PySS streamlines script execution through a user-friendly command-line interface:

usage: pyss [options] [script_name]

A simple script runner for Python.

positional arguments:
  script_name    the name of the script to execute

options:
  -h, --help     show this help message and exit
  -l, --list     show a list of all scripts configured for use
  -t, --test     validate the pyss configuration file
  -s, --silent   execute the script without any output
  -q, --quiet    execute the script while omitting the [pyss] header messages
  -v, --version  prints the program version to stdout

To configure your project with PySS, create a pyss.yaml or pyss.yml file at the project root. This file should enumerate the commands you plan to execute.

Configuration Example

Below is a straightforward example to get you started:

# Configure PySS settings here (all optional).
pyss:
 min_version: 1.0.2
 max_version: 1.1.7

# List your executable scripts.
scripts:
  - name: say-my-name
    description: Outputs a predetermined name
    command: echo Heisenberg

Execute a script by invoking the pyss command at your project's root:

$ pyss say-my-name
[pyss][run script] 'say-my-name'
[pyss][os.system] 'echo Heisenberg'
Heisenberg

Advanced Configuration

For more complex setups, PySS supports environment variables, custom variables, pre/post execution scripts, per-platform customization, shell customization and internal script designation. View the Advanced Configuration documentation for more information.

Validating Your Configuration

To ensure your configuration is valid, run the following command:

$ pyss --test
[pyss][validate] Validating configuration file 'pyss.yaml'...
[pyss][validate] Configuration file 'pyss.yaml' is valid.

Running Scripts

Verbose Execution (Default)

$ export AGE=28
$ pyss run
[pyss][run script] run
[pyss][run script] print-greeting
[pyss][os.system] echo Hello, ${NAME}!
Hello, Heisenberg!
[pyss][os.system] echo Your name is ${NAME}
Your name is Heisenberg
[pyss][os.system] echo You are ${AGE} years old.
You are 28 years old.
[pyss][run script] print-farewell
[pyss][os.system] echo Goodbye, ${NAME}!
Goodbye, Heisenberg!

Quiet Mode (--quiet)

$ export AGE=28
$ pyss --quiet run
Hello, Heisenberg!
Your name is Heisenberg
You are 28 years old.
Goodbye, Heisenberg!

Silent Mode (--silent)

# This mode executes the script without producing any output.

Additional Features

To view a list of configured scripts, use:

$ pyss --list

Credits

Special thanks to Pyss Man: @mavrw

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for pyss 1.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyss 1.1.7
File Size Uploaded
pyss-1.1.7.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyss 1.1.7
File Interpreter ABI Platform
pyss-1.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 22.9 kB

Release files / pyss-1.1.7.tar.gz

Download URL pyss-1.1.7.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d921156b4cb6476ecf488bfd3e7da78f70ab2c4578dedd8e2618bf63e802a63e
BLAKE2b-256 checksum
How to use checksums
8a29cdf151f2b7fe39d59aa8e10bc40d629667d1e8e0fabb81aebdd591f5973f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release files / pyss-1.1.7-py3-none-any.whl

Download URL pyss-1.1.7-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbf6acd3d8f3aee52865907ccf9f784af790de972b55bae91604df550a006878
BLAKE2b-256 checksum
How to use checksums
caaa7f7c46b420c83bc5d5c5bcb861a2e4a63b712a4f09a5c30c7673487d5e7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.1.7 This release

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page