{
  "$schema": "https://ambiqai.github.io/helia-ui/schema/reference-model-1.json",
  "generatedFrom": {
    "sourceCommit": "f341fb11f7f5d77a4974ba8273c4cd55d67c21f0",
    "tool": "pyref",
    "version": "1.7.3"
  },
  "language": "python",
  "modules": [
    {
      "description": "AWS Cloud Utility API\n\nThis module provides utility functions to interact with AWS services.\n\n**Functions**\n\n| Name | Description |\n| --- | --- |\n| `download_s3_file` | Download a file from S3 |\n| `download_s3_object` | Download an object from S3 |\n| `download_s3_prefix` | Download all objects under an S3 prefix into a local directory |\n| `download_s3_objects` | Download all objects in a S3 bucket with a given prefix (deprecated) |",
      "name": "aws",
      "path": "helia_edge.utils.aws",
      "submodules": [],
      "summary": "AWS Cloud Utility API",
      "symbols": [
        {
          "description": "",
          "examples": [],
          "id": "helia_edge.utils.aws.logger",
          "kind": "attribute",
          "language": "python",
          "members": [],
          "name": "logger",
          "params": [],
          "raises": [],
          "returns": [],
          "signature": "logger = setup_logger(__name__)",
          "source": {
            "line": 31,
            "path": "helia_edge/utils/aws.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/aws.py#L31"
          },
          "summary": ""
        },
        {
          "description": "Download a file from S3",
          "examples": [],
          "id": "helia_edge.utils.aws.download_s3_file",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "download_s3_file",
          "params": [
            {
              "description": "Object key",
              "name": "key",
              "type": "str"
            },
            {
              "description": "Destination path",
              "name": "dst",
              "type": "Path"
            },
            {
              "description": "Bucket name",
              "name": "bucket",
              "type": "str"
            },
            {
              "default": "None",
              "description": "S3 client",
              "name": "client",
              "type": "boto3.client"
            },
            {
              "default": "'size'",
              "description": "Checksum type. Defaults to \"size\".",
              "name": "checksum",
              "type": "str"
            },
            {
              "default": "Config(signature_version=UNSIGNED)",
              "description": "Boto3 config. Defaults to Config(signature_version=UNSIGNED).",
              "name": "config",
              "type": "Config"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "True if file was downloaded, False if already exists",
              "name": "bool",
              "type": "bool"
            }
          ],
          "signature": "download_s3_file(\n    key: str,\n    dst: Path,\n    bucket: str,\n    client: boto3.client = None,\n    checksum: str = 'size',\n    config: Config | None = Config(signature_version=UNSIGNED),\n) -> bool",
          "source": {
            "line": 47,
            "path": "helia_edge/utils/aws.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/aws.py#L47"
          },
          "summary": "Download a file from S3"
        },
        {
          "description": "Download an object from S3",
          "examples": [],
          "id": "helia_edge.utils.aws.download_s3_object",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "download_s3_object",
          "params": [
            {
              "description": "Object metadata",
              "name": "item",
              "type": "dict[str, str]"
            },
            {
              "description": "Destination path",
              "name": "dst",
              "type": "Path"
            },
            {
              "description": "Bucket name",
              "name": "bucket",
              "type": "str"
            },
            {
              "default": "None",
              "description": "S3 client",
              "name": "client",
              "type": "boto3.client"
            },
            {
              "default": "'size'",
              "description": "Checksum type. Defaults to \"size\".",
              "name": "checksum",
              "type": "str"
            },
            {
              "default": "Config(signature_version=UNSIGNED)",
              "description": "Boto3 config. Defaults to Config(signature_version=UNSIGNED).",
              "name": "config",
              "type": "Config"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "True if file was downloaded, False if already exists",
              "name": "bool",
              "type": "bool"
            }
          ],
          "signature": "download_s3_object(\n    item: dict[str, str],\n    dst: Path,\n    bucket: str,\n    client: boto3.client = None,\n    checksum: str = 'size',\n    config: Config | None = Config(signature_version=UNSIGNED),\n) -> bool",
          "source": {
            "line": 96,
            "path": "helia_edge/utils/aws.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/aws.py#L96"
          },
          "summary": "Download an object from S3"
        },
        {
          "description": "Download all objects in a S3 bucket with a given prefix.\n\n.. deprecated::\n    Use :func:`download_s3_prefix` instead.  This function preserves the\n    full S3 key (including the prefix) when building local paths, which\n    causes files to be nested one level too deep when ``dst`` already\n    contains the prefix directory.  The replacement strips the prefix so\n    that ``dst`` is always the root of the downloaded tree.",
          "examples": [],
          "id": "helia_edge.utils.aws.download_s3_objects",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "download_s3_objects",
          "params": [
            {
              "description": "Bucket name",
              "name": "bucket",
              "type": "str"
            },
            {
              "description": "Prefix to filter objects",
              "name": "prefix",
              "type": "str"
            },
            {
              "description": "Destination directory",
              "name": "dst",
              "type": "Path"
            },
            {
              "default": "'size'",
              "description": "Checksum type. Defaults to \"size\".",
              "name": "checksum",
              "type": "str"
            },
            {
              "default": "True",
              "description": "Show progress bar. Defaults to True.",
              "name": "progress",
              "type": "bool"
            },
            {
              "default": "None",
              "description": "Number of workers. Defaults to None.",
              "name": "num_workers",
              "type": "int | None"
            },
            {
              "default": "Config(signature_version=UNSIGNED)",
              "description": "Boto3 config. Defaults to Config(signature_version=UNSIGNED).",
              "name": "config",
              "type": "Config | None"
            }
          ],
          "raises": [],
          "returns": [],
          "signature": "download_s3_objects(\n    bucket: str,\n    prefix: str,\n    dst: Path,\n    checksum: str = 'size',\n    progress: bool = True,\n    num_workers: int | None = None,\n    config: Config | None = Config(signature_version=UNSIGNED),\n)",
          "source": {
            "line": 150,
            "path": "helia_edge/utils/aws.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/aws.py#L150"
          },
          "summary": "Download all objects in a S3 bucket with a given prefix."
        },
        {
          "description": "Download all objects under an S3 prefix into a local directory.\n\nUnlike :func:`download_s3_objects`, this function **strips the prefix**\nfrom each object key before joining it with *dst*, so that *dst* becomes\nthe root of the downloaded tree.\n\nExample::\n\n    # S3 objects:  s3://my-bucket/datasets/ptbxl/00001.h5\n    #              s3://my-bucket/datasets/ptbxl/00002.h5\n    download_s3_prefix(\n        bucket=\"my-bucket\",\n        prefix=\"datasets/ptbxl\",\n        dst=Path(\"./data/ptbxl\"),\n    )\n    # Results in: ./data/ptbxl/00001.h5\n    #             ./data/ptbxl/00002.h5",
          "examples": [],
          "id": "helia_edge.utils.aws.download_s3_prefix",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "download_s3_prefix",
          "params": [
            {
              "description": "Bucket name.",
              "name": "bucket",
              "type": "str"
            },
            {
              "description": "Key prefix to filter objects.  A trailing ``/`` is\nadded automatically if missing.",
              "name": "prefix",
              "type": "str"
            },
            {
              "description": "Local directory that will mirror the contents found\nunder *prefix*.",
              "name": "dst",
              "type": "Path"
            },
            {
              "default": "'size'",
              "description": "Checksum strategy (``\"size\"`` or\n``\"md5\"``). Defaults to ``\"size\"``.",
              "name": "checksum",
              "type": "str"
            },
            {
              "default": "True",
              "description": "Show a ``tqdm`` progress bar.\nDefaults to ``True``.",
              "name": "progress",
              "type": "bool"
            },
            {
              "default": "None",
              "description": "Thread-pool size.  ``None``\nuses the :class:`~concurrent.futures.ThreadPoolExecutor`\ndefault.",
              "name": "num_workers",
              "type": "int | None"
            },
            {
              "default": "Config(signature_version=UNSIGNED)",
              "description": "Boto3 client config.\nDefaults to unsigned requests.",
              "name": "config",
              "type": "Config | None"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Number of objects downloaded (excludes skipped / up-to-date).",
              "name": "int",
              "type": "int"
            }
          ],
          "signature": "download_s3_prefix(\n    bucket: str,\n    prefix: str,\n    dst: Path,\n    checksum: str = 'size',\n    progress: bool = True,\n    num_workers: int | None = None,\n    config: Config | None = Config(signature_version=UNSIGNED),\n) -> int",
          "source": {
            "line": 257,
            "path": "helia_edge/utils/aws.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/aws.py#L257"
          },
          "summary": "Download all objects under an S3 prefix into a local directory."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
