latch package#
Subpackages#
- latch.functions package
- latch.registry package
- latch.resources package
- latch.types package
- Submodules
- latch.types.directory module
- latch.types.file module
- latch.types.glob module
- latch.types.json module
- latch.types.metadata module
LatchRuleLatchAppearanceEnumMultiselectOptionMultiselectLatchAppearanceTypeLatchAuthorFlowBaseSectionTextTitleParamsSpoilerForkBranchForkLatchParameterLatchParameter.display_nameLatchParameter.descriptionLatchParameter.hiddenLatchParameter.section_titleLatchParameter.placeholderLatchParameter.commentLatchParameter.outputLatchParameter.batch_table_columnLatchParameter.allow_dirLatchParameter.allow_fileLatchParameter.appearance_typeLatchParameter.rulesLatchParameter.detailLatchParameter.samplesheetLatchParameter.dict
SnakemakeParameterSnakemakeFileParameterSnakemakeFileMetadataLatchMetadataDockerMetadataEnvironmentConfigSnakemakeMetadata
- latch.types.utils module
- Module contents
- latch.verified package
Submodules#
latch.account module#
- class latch.account.Account(id: str)[source]#
Bases:
objectUser or team workspace. Can be used to fetch related resources.
current()is the typical way of getting anAccount.If the current request signer (CLI user or execution context) lacks permissions to fetch some information, the corresponding operations will act as if the information does not exist. Update operations will usually produce errors.
- classmethod current() Self[source]#
Get current account.
In an execution context, this is the workspace in which the execution was run.
In the CLI context (when running latch commands) this is the current setting of latch workspace, which defaults to the user’s default workspace.
- Returns:
Current account.
- load() None[source]#
(Re-)populate this account instance’s cache.
Future calls to most getters will return immediately without making a network request.
Always makes a network request.
- list_registry_projects(*, load_if_missing: Literal[True] = True) List[Project][source]#
- list_registry_projects(*, load_if_missing: bool) List[Project] | None
List Registry projects owned by this workspace.
- Parameters:
load_if_missing – If true,
load()the project list if not in cache. If false, return None if not in cache.- Returns:
Projects owned by this workspace.
- update(*, reload_on_commit: bool = True) Iterator[AccountUpdate][source]#
Start an update transaction.
The transaction will commit when the context manager closes unless an error occurs.
No changes will occur until the transaction commits.
The transaction can be cancelled by running
AccountUpdate.clear()before closing the context manager.- Parameters:
reload_on_commit – If true,
load()this account after the transaction commits.- Returns:
Context manager for the new transaction.
- class latch.account.AccountUpdate(account: latch.account.Account)[source]#
Bases:
object- upsert_registry_project(display_name: str)[source]#
Upsert a registry project.
Not idempotent. Two calls with the same args will create two projects.
- Parameters:
display_name – Display name of the new project.
- delete_registry_project(id: str)[source]#
Delete a registry project.
- Parameters:
id – The ID of the target project.
latch.executions module#
- class latch.executions.TaskIdentifier(token: str, node_name: str, retry: int, arr_index: int | None, arr_retry: int | None)[source]#
Bases:
object
- latch.executions.get_task_identifier() TaskIdentifier | None[source]#
Module contents#
The Latch SDK
A commandline toolchain to define and register serverless workflows with the Latch platform.