latch_cli.services.test_data package#

Submodules#

latch_cli.services.test_data.ls module#

Service to list test objects from a managed bucket.

latch_cli.services.test_data.ls.ls() List[str][source]#

Lists test data objects.

Example

>>> ls()
    # Will return the full S3 paths of all of my objects.

latch_cli.services.test_data.remove module#

Service to remove test objects from a managed bucket.

latch_cli.services.test_data.remove.remove(object_url: str)[source]#

Removes an object from a managed bucket.

Parameters:

object_url – The url of the object to remove.

Example

>>> remove("s3://latch-public/1/foo.txt")
    # Removes the object at this path from your managed bucket prefix.

latch_cli.services.test_data.upload module#

Service to upload test objects to a managed bucket.

latch_cli.services.test_data.upload.upload(src_path: str, dont_confirm_overwrite: bool = True) str[source]#

Uploads a local file/folder to a managed bucket.

Parameters:

src_path – The path of the file/folder to upload.

Returns:

s3 URL of uploaded object.

Example

>>> upload("./foo.txt")
    # Puts the file `foo.txt` in a managed bucket and returns a publicly
    # accesible S3 URL.
latch_cli.services.test_data.upload.upload_helper(src_path: Path, key: str, s3_resource, dont_confirm_overwrite: bool)[source]#
latch_cli.services.test_data.upload.upload_file(src_path: Path, key: str, s3_resource, dont_confirm_overwrite: bool)[source]#

latch_cli.services.test_data.utils module#

Module contents#