Python sdk
caution
The Python SDK is currently in preview, please provide feedback to help us improve it.
The SDK supports python 3.10 and above.
Find the latest version of the Conveyor Python SDK on PyPi. If you want to start using the Conveyor Python SDK, take a look at the how-to guide.
Classes
TaskRunner
Initializing the TaskRunner
class ContainerTaskRunner(
*,
task_name: str,
project_name: str,
environment_name: str,
build_id: Optional[str] = None,
command: Optional[List[str]] = None,
args: Optional[List[str]] = None,
instance_type: DatafyInstanceType,
iam_identity: Optional[str] = None,
instance_lifecycle: InstanceLifecycle,
disk_size: Optional[int] = None,
disk_mount_path: Optional[str] = None,
show_output: bool = True
)
Available methods
def run(self) -> ApplicationRunResult
ApplicationRunResult
Available methods
def has_failed(self) -> bool:
def conveyor_url(self) -> str:
TaskSubmitter
Initializing the TaskSubmitter
class TaskSubmitter(
*tasks: TaskRunner
)
Available methods
Run the submitted tasks:
def run(self) -> Iterator[ApplicationRunResult]
Alternative way to create a TaskSubmitter from a list of TaskRunner objects:
def from_list(tasks: Iterable[TaskRunner]) -> TaskSubmitter
ProjectBuilder
class ProjectBuilder(*, project_path: str)
The project_path can be both a relative as an absolute path to your Conveyor project.
Available methods
def build(self) -> str
Returns the build id of the created build.