Skip to content

System Module

The rite.system module provides system-level operations including process management, environment variables, platform detection, path helpers, and shell utilities.

Overview

This section provides a conceptual overview of the system helpers. Submodule pages contain the full API surface.

Submodules

  • Process: Run and manage system processes.
  • Environment: Manage environment variables.
  • Platform: Detect platform and system information.
  • Path: System path operations.
  • Shell: Shell command utilities.

Examples

from rite.system import (
    process_run,
    env_get,
    platform_is_linux,
    shell_escape
)

# Run process
result = process_run(["ls", "-la"])

# Get environment variable
home = env_get("HOME")

# Platform detection
if platform_is_linux():
    print("Running on Linux")

# Escape shell argument
safe_arg = shell_escape("file with spaces.txt")