bundle.core.process

Attributes

Exceptions

ProcessError

Custom exception for process execution errors.

Classes

ProcessResult

Data class to store the result of a process execution.

Process

Capture output from a shell string or a literal argument sequence.

ProcessStream

Executes a command asynchronously and streams output line by line.

Functions

parse_args(command) → tuple[str, ...]

Normalize literal arguments without splitting or rewriting shell strings.

Module Contents

bundle.core.process.log
bundle.core.process.Command
bundle.core.process.parse_args(command: Command) → tuple[str, ...][source]

Normalize literal arguments without splitting or rewriting shell strings.

class bundle.core.process.ProcessResult(/, **data: Any)[source]

Bases: bundle.core.data.Data

Data class to store the result of a process execution.

command: str
returncode: int
stdout: str
stderr: str
exception bundle.core.process.ProcessError(process: Process, result: ProcessResult)[source]

Bases: Exception

Custom exception for process execution errors.

result
class bundle.core.process.Process(/, **data: Any)[source]

Bases: bundle.core.entity.Entity

Capture output from a shell string or a literal argument sequence.

class bundle.core.process.ProcessStream(/, **data: Any)[source]

Bases: Process

Executes a command asynchronously and streams output line by line.

async callback_stdout(line: str)[source]

Default stdout handler: writes directly to sys.stdout.

async callback_stderr(line: str)[source]

Default stderr handler: writes directly to sys.stderr.