bundle.core.process

Attributes

log

Exceptions

ProcessError

Custom exception for process execution errors.

Classes

ProcessResult

Data class to store the result of a process execution.

Process

Asynchronously executes shell commands and captures their output.

ProcessStream

Executes a command asynchronously and streams output line by line.

Module Contents

bundle.core.process.log
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 | ProcessStream, 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

Asynchronously executes shell commands and captures their output.

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.