Metadata-Version: 2.4
Name: synology-apm-repo-sdk
Version: 0.1.1
Summary: Offline, read-only Python SDK for Synology APM/APV/Object-Storage dedup repository formats
Author: Synology Inc.
License-Expression: Apache-2.0
Project-URL: Homepage, https://www.synology.com/products/ActiveProtectAppliance
Project-URL: Repository, https://github.com/synology-apm/apm-repo-sdk-python
Project-URL: Documentation, https://synology-apm.github.io/apm-repo-sdk-python/
Project-URL: Issue Tracker, https://github.com/synology-apm/apm-repo-sdk-python/issues
Keywords: synology,activeprotect,backup,apm,dedup,sdk
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: zstandard>=0.22
Requires-Dist: lz4>=4.3
Requires-Dist: cryptography>=42.0
Requires-Dist: icalendar>=5.0
Requires-Dist: aiosqlite>=0.20
Requires-Dist: aioboto3>=13.0
Requires-Dist: azure-storage-blob>=12.19
Requires-Dist: aiohttp>=3.9
Requires-Dist: keyring>=25.0
Requires-Dist: smbprotocol>=1.15
Requires-Dist: dissect.volume>=3.18
Requires-Dist: dissect.ntfs>=3.16
Requires-Dist: dissect.extfs>=3.15
Requires-Dist: dissect.xfs>=3.13
Requires-Dist: dissect.btrfs>=1.10
Requires-Dist: dissect.fat>=3.13
Requires-Dist: dissect.apfs>=1.1
Dynamic: license-file

# synology-apm-repo-sdk

Offline, read-only Python SDK for the Synology APV/Object-Storage
dedup backup repository on-disk format. No network access, no writes to the
repository — it only decodes what's already on disk (local filesystem, a
mounted S3/Azure object store, or an SMB share) into browsable catalogs,
workloads, versions, and restorable files.

## Install

```bash
uv add synology-apm-repo-sdk        # inside a uv project
pip install synology-apm-repo-sdk   # any other environment
```

Full API reference: https://synology-apm.github.io/apm-repo-sdk-python/

## Usage

```python
import asyncio

from synology_apm_repo.sdk import Session


async def main() -> None:
    async with Session() as session:
        for repo in await session.open("/path/to/repository"):
            if repo.is_encrypted:
                verification = await repo.set_key("<userKeyID>@<base64 userKey>")
                if not verification.ok:
                    print(f"wrong key for {repo}")
                    continue
            for catalog in await repo.catalogs():
                for workload in await catalog.workloads():
                    for version in await catalog.versions(workload):
                        print(catalog.display_name, workload.display_name, version.display_name)


asyncio.run(main())
```

Everything the SDK does is `async def`; `Session`/`Repository` (both usable
as async context managers) are the entry point for a normal consumer —
`Repository` is one opened bucket or vault, `Catalog` (from
`Repository.catalogs()`) is one connection's worth of data within it.

## Requirements

Python 3.11+.

## License

Apache-2.0.
