This part of the documentation covers all the interfaces of pypette.
Gate Object¶
BashJob Object¶
Job Object¶
Pipe Object¶
- class pypette.Pipe(name: str, gate: pypette.pipes.Gate = Gate.FAIL_FAST)[source]¶
Class to define the pipeline structure.
- add_dependency(*args)[source]¶
Method to add dependency of one pipe on another.
- Parameters
args – Pipes to be added as dependency for this pipeline.
- add_jobs(jobs: List[Union[pypette.jobs.Job, pypette.jobs.BashJob, pypette.pipes.Pipe]], run_in_parallel: bool = False)[source]¶
Method to add jobs to pipeline.
- Parameters
jobs – List of jobs/pipes to run.
run_in_parallel – This flag when set to False(default) runs the list of jobs given one after another. This flag if set to True runs the jobs/pipes submitted in parallel threads.
- add_stage(*args)[source]¶
Method to add stages of pipeline. Jobs are to be given comma separated and all the jobs given form a single stage. Another way to add jobs to a pipeline in builder pattern.
- Parameters
args – Jobs to be added. Adds comma separated list in parallel or a single job as a stage.
ThreadState Object¶
ThreadWrapper Object¶
- class pypette.ThreadWrapper(job: Any)[source]¶
Wrapper around a thread to allow for exception handling and safe job execution.
- property exception: Optional[Exception]¶
Exception thrown by thread if any.
- property job: Any¶
Job being run by the thread.
- property state: pypette.threadwrapper.ThreadState¶
Thread’s current state.