> For the complete documentation index, see [llms.txt](https://docs.unitlab.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unitlab.ai/api-sdk-cli/ko/sdks/pattern-cloud-folder-to-project.md).

# 패턴: 클라우드 폴더에서 프로젝트로

Python SDK로 연결된 S3, GCS, Azure 버킷의 새 녹화를 미디어 복사 없이 정해진 일정에 따라 프로젝트로 가져와 라벨링 대기열에 넣는 패턴을 설명합니다.

로봇이나 차량이 S3, GCS, Azure에 녹화를 기록하고, 야간 작업이 새 녹화를 라벨링 대기열에 넣어야 할 때 이 패턴을 사용하세요.

```python
import os
from unitlab import UnitlabClient

PREFIX = "fleet/cell-04/2026-11-21/"

client = UnitlabClient()
try:
    storage = client.cloud_storages.get(os.environ["CLOUD_STORAGE_ID"])
    project = client.projects.get(os.environ["PROJECT_ID"])

    paths = [entry.name for entry in storage.browse(prefix=PREFIX, project=project)
             if entry.type == "file" and entry.is_extension_allowed]
    if not paths:
        raise SystemExit("Nothing new")

    batch = project.import_cloud(storage, paths, fps=2.0)
    status = batch.wait(timeout=3600)
    print(f"Imported {status.completed} of {status.total}, {status.failed} failed")
finally:
    client.close()
```

접두사 전체를 가져오려면 개별 파일 대신 `/`로 끝나는 폴더 경로를 전달하세요. 접두사마다 가져오기를 한 번씩 실행하고 Batch Queue ID를 작업 로그에 남겨 두면, 다시 실행할 때 이미 들어온 항목을 확인할 수 있습니다.

## 요구 사항 <a href="#requirements" id="requirements"></a>

* 앱에서 만든 클라우드 스토리지 연결(버킷 읽기 권한 포함)
* **Manage cloud storage**와 **Manage data** 권한이 있는 키

## 관련 문서 <a href="#related" id="related"></a>

[클라우드 스토리지](https://docs.unitlab.ai/api-sdk-cli/ko/sdks/cloud-storage.md) · [Batch Queue와 처리 상태](https://docs.unitlab.ai/api-sdk-cli/ko/sdks/batch-queues-and-processing.md) · [CLI 자동화와 종료 동작](https://docs.unitlab.ai/api-sdk-cli/ko/clis/cli-automation-and-exit-behavior.md)
