Safe subprocess wrapper (list-only, no shell injection) with stream/timeout support — standalone module from the SciTeX ecosystem
Project description
scitex-sh
Safe subprocess wrapper — list-only (no shell-string parsing), structured result, timeouts, streaming.
Full Documentation · pip install scitex-sh
Installation
pip install scitex-sh
Quick Start
import scitex_sh as sh
res = sh.sh(["git", "status"])
print(res["stdout"])
1 Interfaces
Python API
import scitex_sh as sh
# Dict result (stdout / stderr / returncode / success)
res = sh.sh(["git", "status"])
# String result
out = sh.sh(["ls", "-la"], return_as="str")
# Streamed output
sh.sh(["./long-running.sh"], stream_output=True)
# Timeout
sh.sh(["sleep", "10"], timeout=2)
# Lower-level
res = sh.sh_run(["echo", "hi"])
sh.quote("hello world") # 'hello world' (POSIX-quoted)
Status
Standalone fork of scitex.sh. Zero deps (pure stdlib). The umbrella package's
scitex.sh import path is preserved via a sys.modules-alias bridge. The
scitex.str.color_text dep used for terminal output is replaced with a tiny
inline ANSI helper that respects NO_COLOR and TTY detection.
Part of SciTeX
scitex-sh is part of SciTeX.
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
License
AGPL-3.0-only (see LICENSE).
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 scitex_sh-0.1.2.tar.gz.
File metadata
- Download URL: scitex_sh-0.1.2.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69ceb2985e6cd8a8fb3985661e8c752cdfe85b1ec35536f85c5f6b3b75f54584
|
|
| MD5 |
9d3509abf939997332c7b7043ae7b4ab
|
|
| BLAKE2b-256 |
e11bc60a6e3c3a6aff666d4ea441b5a70c2d4a6876ba9859470c79da60716101
|
Provenance
The following attestation bundles were made for scitex_sh-0.1.2.tar.gz:
Publisher:
publish-pypi.yml on ywatanabe1989/scitex-sh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_sh-0.1.2.tar.gz -
Subject digest:
69ceb2985e6cd8a8fb3985661e8c752cdfe85b1ec35536f85c5f6b3b75f54584 - Sigstore transparency entry: 1417542235
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-sh@5329f0c171f31b3460ee99869ae576478f43732d -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@5329f0c171f31b3460ee99869ae576478f43732d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file scitex_sh-0.1.2-py3-none-any.whl.
File metadata
- Download URL: scitex_sh-0.1.2-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7203d6796cd8bad8d23c9434b05146037b9394a37609034519aaefa389fd9c5
|
|
| MD5 |
cc8c3883d2aa335e6837a3ce5ad126eb
|
|
| BLAKE2b-256 |
d0a0713b43106cbf84e5977ee797d8ecde29748f6c48691978867a879e4be3f7
|
Provenance
The following attestation bundles were made for scitex_sh-0.1.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on ywatanabe1989/scitex-sh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scitex_sh-0.1.2-py3-none-any.whl -
Subject digest:
f7203d6796cd8bad8d23c9434b05146037b9394a37609034519aaefa389fd9c5 - Sigstore transparency entry: 1417542249
- Sigstore integration time:
-
Permalink:
ywatanabe1989/scitex-sh@5329f0c171f31b3460ee99869ae576478f43732d -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/ywatanabe1989
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@5329f0c171f31b3460ee99869ae576478f43732d -
Trigger Event:
workflow_dispatch
-
Statement type: