Skip to main content

scitex-os

SciTeX

Host check + safe file move helpers — minimal deps.

Full Documentation · uv pip install scitex-os[all]

pypi python docs docs-rtd

tests install-check cov


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
## Architecture
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

  1. The freedom to run your research anywhere — your machine, your terms.
  2. The freedom to study how every step works — from raw data to final manuscript.
  3. The freedom to redistribute your workflows, not just your papers.
  4. 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).


SciTeX

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)

Source distribution for scitex-os 0.1.9
File Size Uploaded
scitex_os-0.1.9.tar.gz 7.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for scitex-os 0.1.9
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.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