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
LatchRule
LatchAppearanceEnum
MultiselectOption
Multiselect
LatchAppearanceType
LatchAuthor
FlowBase
Section
Text
Title
Params
Spoiler
ForkBranch
Fork
LatchParameter
LatchParameter.display_name
LatchParameter.description
LatchParameter.hidden
LatchParameter.section_title
LatchParameter.placeholder
LatchParameter.comment
LatchParameter.output
LatchParameter.batch_table_column
LatchParameter.allow_dir
LatchParameter.allow_file
LatchParameter.appearance_type
LatchParameter.rules
LatchParameter.detail
LatchParameter.samplesheet
LatchParameter.dict
SnakemakeParameter
SnakemakeFileParameter
SnakemakeFileMetadata
LatchMetadata
DockerMetadata
EnvironmentConfig
SnakemakeMetadata
- latch.types.utils module
- Module contents
- latch.verified package
Submodules#
latch.account module#
- class latch.account.Account(id: str)[source]#
Bases:
object
User 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.