{
  "$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": "# File Utility API\n\nThis module provides utility functions to interact with files.\n\n**Functions**\n\n| Name | Description |\n| --- | --- |\n| `download_file` | Download file from supplied url to destination streaming |\n| `compute_checksum` | Compute checksum of file |\n| `load_pkl` | Load pickled file |\n| `save_pkl` | Save python objects into pickle file |\n| `resolve_template_path` | Resolve templated path w/ supplied substitutions |",
      "name": "file",
      "path": "helia_edge.utils.file",
      "submodules": [],
      "summary": "File Utility API",
      "symbols": [
        {
          "description": "Download file from supplied url to destination streaming.",
          "examples": [],
          "id": "helia_edge.utils.file.download_file",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "download_file",
          "params": [
            {
              "description": "Source URL path",
              "name": "src",
              "type": "str"
            },
            {
              "description": "Destination file path",
              "name": "dst",
              "type": "PathLike"
            },
            {
              "default": "True",
              "description": "Display progress bar. Defaults to True.",
              "name": "progress",
              "type": "bool"
            }
          ],
          "raises": [],
          "returns": [],
          "signature": "download_file(src: str, dst: os.PathLike, progress: bool = True, chunk_size: int = 8192)",
          "source": {
            "line": 26,
            "path": "helia_edge/utils/file.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/file.py#L26"
          },
          "summary": "Download file from supplied url to destination streaming."
        },
        {
          "description": "Compute checksum of file.",
          "examples": [],
          "id": "helia_edge.utils.file.compute_checksum",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "compute_checksum",
          "params": [
            {
              "description": "File path",
              "name": "file",
              "type": "Path"
            },
            {
              "default": "'md5'",
              "description": "Checksum type. Defaults to \"md5\".",
              "name": "checksum_type",
              "type": "str"
            },
            {
              "default": "8192",
              "description": "Chunk size. Defaults to 8192.",
              "name": "chunk_size",
              "type": "int"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Checksum value",
              "name": "str",
              "type": "str"
            }
          ],
          "signature": "compute_checksum(file: Path, checksum_type: str = 'md5', chunk_size: int = 8192) -> str",
          "source": {
            "line": 49,
            "path": "helia_edge/utils/file.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/file.py#L49"
          },
          "summary": "Compute checksum of file."
        },
        {
          "description": "Load pickled file.",
          "examples": [],
          "id": "helia_edge.utils.file.load_pkl",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "load_pkl",
          "params": [
            {
              "description": "File path (.pkl)",
              "name": "file",
              "type": "str"
            },
            {
              "default": "True",
              "description": "If file is compressed. Defaults to True.",
              "name": "compress",
              "type": "bool"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "dict[str, Any]: Dictionary of pickled objects",
              "type": "dict[str, Any]"
            }
          ],
          "signature": "load_pkl(file: str, compress: bool = True) -> dict[str, Any]",
          "source": {
            "line": 69,
            "path": "helia_edge/utils/file.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/file.py#L69"
          },
          "summary": "Load pickled file."
        },
        {
          "description": "Save python objects into pickle file.",
          "examples": [],
          "id": "helia_edge.utils.file.save_pkl",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "save_pkl",
          "params": [
            {
              "description": "File path (.pkl)",
              "name": "file",
              "type": "str"
            },
            {
              "default": "True",
              "description": "Whether to compress file. Defaults to True.",
              "name": "compress",
              "type": "bool"
            }
          ],
          "raises": [],
          "returns": [],
          "signature": "save_pkl(file: str, compress: bool = True, **kwargs={})",
          "source": {
            "line": 87,
            "path": "helia_edge/utils/file.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/file.py#L87"
          },
          "summary": "Save python objects into pickle file."
        },
        {
          "description": "Resolve templated path w/ supplied substitutions.",
          "examples": [],
          "id": "helia_edge.utils.file.resolve_template_path",
          "kind": "function",
          "language": "python",
          "members": [],
          "name": "resolve_template_path",
          "params": [
            {
              "description": "File path",
              "name": "fpath",
              "type": "Path"
            },
            {
              "default": "{}",
              "description": "Template arguments",
              "name": "**kwargs",
              "type": "Any"
            }
          ],
          "raises": [],
          "returns": [
            {
              "description": "Resolved file path",
              "name": "Path",
              "type": "Path"
            }
          ],
          "signature": "resolve_template_path(fpath: Path, **kwargs: Any = {}) -> Path",
          "source": {
            "line": 102,
            "path": "helia_edge/utils/file.py",
            "url": "https://github.com/AmbiqAI/helia-edge/blob/f341fb11f7f5d77a4974ba8273c4cd55d67c21f0/helia_edge/utils/file.py#L102"
          },
          "summary": "Resolve templated path w/ supplied substitutions."
        }
      ]
    }
  ],
  "name": "helia_edge"
}
