scitex-os
Host check + safe file move helpers — minimal deps.
Full Documentation · uv pip install scitex-os[all]
Problem and Solution
| # | Problem | Solution |
|---|---|---|
| 1 | Scattered host checks — every repo hand-rolls socket.gethostname() == 'X' with its own style and no consistent failure message |
scitex_os.check_host / is_host / verify_host -- single canonical helper triple; check_host and is_host return bool, verify_host calls sys.exit(1) on mismatch |
| 2 | Fragile renames — os.rename fails across filesystems with "Invalid cross-device link" |
scitex_os.mv(src, dst) -- atomic when same filesystem, copy+unlink fallback otherwise; auto-creates parent dir |
Quick Start
import scitex_os as sxos
if sxos.is_host("compute-01"):
sxos.mv(src, tgt)
Demo
flowchart LR
A[script.py] -->|is_host| B{hostname<br/>matches?}
B -- yes --> C[sxos.mv src → tgt<br/>auto mkdir parent]
B -- no --> D[skip / raise]
Figure 1. Demo path. Host match gates the move; mismatch skips or raises before anything runs.
import scitex_os as sxos
if sxos.is_host("compute-01"):
sxos.mv("results/run.csv", "/shared/runs/2026-05-07/run.csv")
# parent dir is auto-created; cross-filesystem moves are handled.
$ python -c "import scitex_os; print(scitex_os.is_host('laptop'))"
True
Installation
uv pip install "scitex-os[all]"
Per-module extras
| Extra | Pulls in |
|---|---|
all |
dev + docs (recommended) |
dev |
pytest, pytest-cov, ruff |
docs |
Sphinx + RTD theme + myst-parser (docs build only) |
uv pip install -e ".[dev]" # editable install for contributors
flowchart LR
H[keyword] --> C[check_host / is_host]
C --> B{hostname<br/>matches?}
B -- yes --> M[mv src to tgt]
B -- no --> X[verify_host exits 1]
M --> OK[moved + parent auto-created]
Figure 2. Helper flow. Host gating decides whether the move runs; moves auto-create parents and survive cross-filesystem targets.
1 Interfaces
Python API
import scitex_os as sxos
sxos.is_host("hostname") # bool
sxos.check_host("hostname") # bool
sxos.verify_host("hostname") # sys.exit(1) on mismatch
sxos.mv(src, tgt) # shutil.move with mkdir(tgt)
Status
Standalone fork of scitex.os. Minimal deps (scitex-logging for output).
The umbrella package's
scitex.os import path is preserved via a sys.modules-alias bridge.
Part of SciTeX
scitex-os is part of SciTeX. Install via
the umbrella with pip install scitex[os] to use as
scitex.os (Python) or scitex os ... (CLI).
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).
Metadata
Release files for scitex-os 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scitex_os-0.1.9.tar.gz | 7.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scitex_os-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.4 MB
Release files / scitex_os-0.1.9.tar.gz
| Download URL | scitex_os-0.1.9.tar.gz |
|---|---|
| Size | 7.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4130973b3eed65af8346f668572403a5f0a4e97c2b850c96c95cd24e02690ba4
|
|
BLAKE2b-256 checksum How to use checksums |
6cfd0b1e8e33b407176e3ed6c4153526ff646d4ee735e83d4db5cfd239c298c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / scitex_os-0.1.9-py3-none-any.whl
| Download URL | scitex_os-0.1.9-py3-none-any.whl |
|---|---|
| Size | 7.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a6f3b75aff15d4a9760da178141377b702a661c567b35870351e39bf7390b9b0
|
|
BLAKE2b-256 checksum How to use checksums |
ce3f42058e74c64886b0ee4c79839f1bc5eac3ac4f005ce428ce7667c67fd3b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|