> 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/hi/sdks/pattern-assets-to-a-release.md).

# पैटर्न: Assets से रिलीज़ तक

Python SDK पैटर्न: रोबोट रिकॉर्डिंग लाइब्रेरी में अपलोड करें, डेटासेट वर्शन पब्लिश करें, उसे प्रोजेक्ट से अटैच करें और रिलीज़ एक्सपोर्ट करें।

इसका इस्तेमाल तब करें जब एक ही फ़ाइलें कई प्रोजेक्ट्स में जाती हों, या जब हर रिलीज़ को किसी सटीक डेटासेट वर्शन तक ट्रेस करना ज़रूरी हो।

```python
from unitlab import UnitlabClient

client = UnitlabClient()
try:
    # 1. Store the files once in the library.
    uploaded = client.assets.upload("./cell-04", folder="Robot cell 04", tags=["2026-11"])
    if uploaded.failed:
        raise SystemExit(f"{len(uploaded.failed)} files failed to upload")

    # 2. Freeze a curated selection.
    dataset = client.datasets.create("Bin picking - training", folder_ids=[uploaded.folder_id])
    version = dataset.publish_version("v1: cell 04")

    # 3. Label it in a project.
    project = client.projects.get("PROJECT_ID")
    result = project.attach(dataset_versions=[{"dataset_id": dataset.id, "version_number": version.version_number}])
    project.batch_queue(result.batch_queue_id).wait()

    # ...annotate and review in the app...

    # 4. Export reviewed work.
    release = client.releases.create(project, export_type="COCO", completed_only=True)
    print(release.download(dest="./export"))
finally:
    client.close()
```

## यह क्रम क्यों <a href="#why-this-order" id="why-this-order"></a>

| चरण                     | आपको क्या मिलता है                                                 |
| ----------------------- | ------------------------------------------------------------------ |
| लाइब्रेरी अपलोड         | हर फ़ाइल की एक कॉपी, जो कई प्रोजेक्ट्स में दोबारा इस्तेमाल होती है |
| पब्लिश किया गया वर्शन   | फ़ाइलों की एक तय सूची, जिसका हवाला आप model card में दे सकते हैं   |
| वर्शन नंबर से अटैच      | प्रोजेक्ट को ठीक वही सूची मिलती है, भले ही बाद में डेटासेट बदल जाए |
| `completed_only` रिलीज़ | सिर्फ़ रिव्यू किए गए आइटम ट्रेनिंग तक पहुँचते हैं                  |

डेटासेट ID, वर्शन नंबर और रिलीज़ ID अपने ट्रेनिंग रन के साथ दर्ज करें।

## संबंधित पेज <a href="#related" id="related"></a>

[डेटासेट](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/datasets.md) · [लाइब्रेरी डेटा अटैच और डिटैच करना](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/attach-and-detach-project-sources.md) · [रिलीज़ बनाना और डाउनलोड करना](https://docs.unitlab.ai/api-sdk-cli/hi/sdks/create-and-download-releases.md)
