Execute terminal commands from Python easily.
Project description
terminalExecutepy
terminalExecutepy is a lightweight Python utility for executing terminal or shell commands directly from Python with clean output handling and optional error management. It simplifies subprocess usage and provides a straightforward API for running commands programmatically across Windows, macOS, and Linux.
Features
- Execute terminal commands with a single function call.
- Capture output, errors, and return codes.
- Cross‑platform support.
- No external dependencies.
- Ideal for automation, scripting, and CLI tool integration.
Installation
Install from PyPI:
pip install terminalExecutepy
Or install it from source:
pip install git+https://github.com/ahk4918/terminalExecutepy.git
Usage:
Basic example:
from terminalExecutepy import terminalExecute
result = terminalExecute("echo Hello World")
print(result.output)
Example with error handling
from terminalExecutepy import terminalExecute
cmd = "dir" # or 'ls' on Linux/macOS
result = terminalExecute(cmd)
if result.success:
print("Command output:")
print(result.output)
else:
print("Command failed:")
print(result.error)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terminalexecute-1.0.0.tar.gz.
File metadata
- Download URL: terminalexecute-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea7cdd004f9d5020e52dc0808b697ff837605ef3ec4c28c7373cc767bd866c11
|
|
| MD5 |
a921a83acf6bdd3a3e57dbecabd0e115
|
|
| BLAKE2b-256 |
a2f29612aa34a9ad00d24e88b7ae7e066350e7ae53dfced5d834f2fc0b43168d
|
Provenance
The following attestation bundles were made for terminalexecute-1.0.0.tar.gz:
Publisher:
terminalExecute.yml on ahk4918/terminalExecutepy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terminalexecute-1.0.0.tar.gz -
Subject digest:
ea7cdd004f9d5020e52dc0808b697ff837605ef3ec4c28c7373cc767bd866c11 - Sigstore transparency entry: 1005353358
- Sigstore integration time:
-
Permalink:
ahk4918/terminalExecutepy@170e055f4e33c7d16b0bb9e8af6547f845c696ee -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ahk4918
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
terminalExecute.yml@170e055f4e33c7d16b0bb9e8af6547f845c696ee -
Trigger Event:
push
-
Statement type:
File details
Details for the file terminalexecute-1.0.0-py3-none-any.whl.
File metadata
- Download URL: terminalexecute-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d3de928ee50907e9db37c57e306658ca9bbd522aa3802ad23dc7e367a42012f
|
|
| MD5 |
7605a26dac6aad1c97f8589b5d1bf731
|
|
| BLAKE2b-256 |
c66c8e27399077fa35dbefc889cbc54bdb5c83844784d1ecf3f25de1e945a8da
|
Provenance
The following attestation bundles were made for terminalexecute-1.0.0-py3-none-any.whl:
Publisher:
terminalExecute.yml on ahk4918/terminalExecutepy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
terminalexecute-1.0.0-py3-none-any.whl -
Subject digest:
7d3de928ee50907e9db37c57e306658ca9bbd522aa3802ad23dc7e367a42012f - Sigstore transparency entry: 1005353360
- Sigstore integration time:
-
Permalink:
ahk4918/terminalExecutepy@170e055f4e33c7d16b0bb9e8af6547f845c696ee -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/ahk4918
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
terminalExecute.yml@170e055f4e33c7d16b0bb9e8af6547f845c696ee -
Trigger Event:
push
-
Statement type: