Source: http://www.poma-ai.com/docs/sdk/reference/poma-archive

# PomaArchive API Reference

```python
from poma import PomaArchive
```

`PomaArchive` wraps a raw `.poma` archive. A `.poma` archive is a zip file that contains the structured SDK output.

In practice, the core archive files are `chunks.json` and `chunksets.json`, with optional helpers such as `image_sources.json` and files inside `assets/`. Some archives also include additional processing artifacts like `final_input.md`, `metadata_archive.json`, `metadata_content.json`, `tables/`, and `input_prepared/`.

## Archive contents

<PomaArchiveExplorer />

## Constructor

```python
PomaArchive(
    data: bytes | None = None,
    path: str | os.PathLike[str] | None = None,
)
```

Pass either:

- `data` for in-memory archive bytes
- `path` for an archive on disk

## Methods

### `unpack`

```python
unpack() -> PomaResult
```

Unpack the archive and return typed `PomaResult` data.

`unpack()` focuses on typed chunks, chunksets, and images, even when the archive also contains extra processing artifacts.

### `as_inputs`

```python
as_inputs() -> tuple[bytes | None, str | None]
```

Return the raw in-memory archive bytes or saved archive path. This is mainly useful for compatibility helpers.

## Shortcut helper

If you already have archive bytes or a path, you can skip constructing `PomaArchive`:

```python
from poma import unpack

result = unpack("store/example.poma")
```

## Example

```python
from poma import PomaArchive

archive = PomaArchive(path="store/example.poma")
result = archive.unpack()
```