latch_cli package#
Subpackages#
- latch_cli.auth package
- latch_cli.centromere package
- latch_cli.docker_utils package
- latch_cli.exceptions package
- latch_cli.services package
- Subpackages
- latch_cli.services.cp package
- Submodules
- latch_cli.services.cp.autocomplete module
- latch_cli.services.cp.config module
- latch_cli.services.cp.download module
- latch_cli.services.cp.exceptions module
- latch_cli.services.cp.glob module
- latch_cli.services.cp.ldata_utils module
- latch_cli.services.cp.main module
- latch_cli.services.cp.manager module
- latch_cli.services.cp.progress module
- latch_cli.services.cp.remote_copy module
- latch_cli.services.cp.throttle module
- latch_cli.services.cp.upload module
- latch_cli.services.cp.utils module
- Module contents
- latch_cli.services.deprecated package
- latch_cli.services.init package
- latch_cli.services.register package
- latch_cli.services.test_data package
- latch_cli.services.cp package
- Submodules
- latch_cli.services.execute module
- latch_cli.services.get module
- latch_cli.services.get_executions module
- latch_cli.services.get_params module
- latch_cli.services.launch module
- latch_cli.services.local_dev module
- latch_cli.services.local_dev_old module
- latch_cli.services.login module
- latch_cli.services.ls module
- latch_cli.services.move module
- latch_cli.services.open_file module
- latch_cli.services.preview module
- latch_cli.services.stop_pod module
- latch_cli.services.sync module
- latch_cli.services.workspace module
- Module contents
- Subpackages
- latch_cli.tui package
- latch_cli.utils package
- Submodules
- latch_cli.utils.ldata module
- latch_cli.utils.path module
- Module contents
urljoins()
AuthenticationError
get_auth_header()
sub_from_jwt()
with_si_suffix()
human_readable_time()
hash_directory()
generate_temporary_ssh_credentials()
get_local_package_version()
get_latest_package_version_request()
get_latest_package_version()
TemporarySSHCredentials
WorkflowType
identifier_suffix_from_str()
identifier_from_str()
get_parameter_json_value()
check_exists_and_rename()
best_effort_display_name()
Submodules#
latch_cli.click_utils module#
- class latch_cli.click_utils.EnumChoice(choices: Type[Enum], case_sensitive: bool = True)[source]#
Bases:
Choice
- convert(value: Any, param: Parameter | None, ctx: Context | None) Any [source]#
Convert the value to the correct type. This is not called if the value is
None
(the missing value).This must accept string values from the command line, as well as values that are already the correct type. It may also convert other compatible types.
The
param
andctx
arguments may beNone
in certain situations, such as when converting prompt input.If the value cannot be converted, call
fail()
with a descriptive message.- Parameters:
value – The value to convert.
param – The parameter that is using this type to convert its value. May be
None
.ctx – The current context that arrived at this value. May be
None
.
- class latch_cli.click_utils.ColoredHelpFormatter(indent_increment: int = 2, width: int | None = None, max_width: int | None = None)[source]#
Bases:
HelpFormatter
- write_usage(prog: str, args: str = '', prefix: str | None = None) None [source]#
Writes a usage line into the buffer.
- Parameters:
prog – the program name.
args – whitespace separated list of arguments.
prefix – The prefix for the first line. Defaults to
"Usage: "
.
- write_dl(rows: Sequence[Tuple[str, str]], col_max: int = 30, col_spacing: int = 2) None [source]#
Writes a definition list into the buffer. This is how options and commands are usually formatted.
- Parameters:
rows – a list of two item tuples for the terms and values.
col_max – the maximum width of the first column.
col_spacing – the number of spaces between the first and second column.
- class latch_cli.click_utils.LatchCommand(name: str | None, context_settings: MutableMapping[str, Any] | None = None, callback: Callable[[...], Any] | None = None, params: List[Parameter] | None = None, help: str | None = None, epilog: str | None = None, short_help: str | None = None, options_metavar: str | None = '[OPTIONS]', add_help_option: bool = True, no_args_is_help: bool = False, hidden: bool = False, deprecated: bool = False)[source]#
Bases:
Command
- class latch_cli.click_utils.LatchGroup(name: str | None = None, commands: MutableMapping[str, Command] | Sequence[Command] | None = None, **attrs: Any)[source]#
Bases:
LatchCommand
,Group
- class latch_cli.click_utils.AnsiCodes[source]#
Bases:
object
- full_reset = '\x1b[0m'#
- color = '\x1b[38;5;39m'#
- reset_color = '\x1b[39m'#
- bold = '\x1b[1m'#
- reset_bold = '\x1b[22m'#
- underline = '\x1b[4m'#
- no_underline = '\x1b[24m'#
- url_href = '\x1b]8;;'#
- url_name = '\x1b\\'#
- url_end = '\x1b]8;;\x1b\\'#
latch_cli.constants module#
- class latch_cli.constants.Units(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
-
- KiB = 1024#
- kB = 1000#
- MiB = 1048576#
- MB = 1000000#
- GiB = 1073741824#
- GB = 1000000000#
- TiB = 1099511627776#
- TB = 1000000000000#
- class latch_cli.constants.LatchConstants(base_image: str = '812206152185.dkr.ecr.us-west-2.amazonaws.com/latch-base:fe0b-main', file_max_size: int = 4194304, file_chunk_size: int = 268435456, pkg_name: str = 'latch', pkg_config: str = '.latch/config', jump_host: str = 'jump.centromere.latch.bio', jump_user: str = 'jumpuser', centromere_poll_timeout: int = 18000, centromere_keepalive_interval: int = 30)[source]#
Bases:
object
- maximum_upload_parts = 10000#
- maximum_upload_size = 5497558138880#
- ignore_regex = re.compile('(\\.git|\\.latch_report\\.tar\\.gz|traceback\\.txt|metadata\\.json)$')#
- class latch_cli.constants.OAuth2Constants(client_id: str = 'jzFBOhIbfp4EPRYZ8wmx4YyvL27LFDeB', authz_server_host: str = 'https://latchai.us.auth0.com', redirect_url: str = 'http://127.0.0.1:5050/callback')[source]#
Bases:
object
- client_id: str = 'jzFBOhIbfp4EPRYZ8wmx4YyvL27LFDeB'#
Identifies the authentication server in 0Auth2.0 flow
latch_cli.main module#
Entrypoints to service functions through a latch_cli.
latch_cli.tinyrequests module#
- class latch_cli.tinyrequests.TinyResponse(resp: HTTPResponse, url: str, *, stream: bool = False)[source]#
Bases:
object
- property headers#
- property status_code#
- property content#
- property url#
- latch_cli.tinyrequests.request(method: str, url: str, *, headers: Dict[str, str] | None = {}, data: Any | None = None, json: bytes | None = None, stream: bool = False, num_retries: int = 3) TinyResponse [source]#
Send HTTP request. Retry on 500s or ConnectionErrors. Implements exponential backoff between retries.
- latch_cli.tinyrequests.get(url: str, *, headers: Dict[str, str] = {}, data: bytes | None = None, json: Any | None = None, stream: bool = False, num_retries: int = 3) TinyResponse [source]#
latch_cli.workflow_config module#
- class latch_cli.workflow_config.BaseImageOptions(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
-
- default = 'default'#
- cuda = 'cuda'#
- opencl = 'opencl'#
- class latch_cli.workflow_config.LatchWorkflowConfig(latch_version: str, base_image: str, date: str)[source]#
Bases:
object
Configuration for a Latch workflow.
- latch_cli.workflow_config.create_and_write_config(pkg_root: Path, base_image_type: BaseImageOptions = BaseImageOptions.default)[source]#