> 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/de/sdks/projects.md).

# Projekte

Projekte mit dem Unitlab Python-SDK auflisten, erstellen, aktualisieren und löschen, inklusive Ontologie-Zuordnung, Projekt-Handle-Methoden und Feldern.

Ein Projekt enthält Arbeitselemente, eine Ontologie und einen Workflow. Projekte haben keinen festen Datentyp: Ein Projekt kann Bilder, Videos, Dokumente und mehr enthalten.

## Auflisten und abrufen <a href="#list-and-get" id="list-and-get"></a>

```python
projects = client.projects.list()
project = client.projects.get("PROJECT_ID")
print(project.name, project.data_item_count, project.ontology_hash)
```

## Erstellen <a href="#create" id="create"></a>

```python
ontology = client.ontologies.get("ONTOLOGY_ID")
project = client.projects.create("Pallet inspection", ontology_hash=ontology.id)
```

`ontology_hash` ist optional. Ohne diesen Wert startet das Projekt ohne Klassen; fügen Sie eine Ontologie in der App hinzu oder erstellen Sie zuerst eine mit [Ontologien in Python erstellen](https://docs.unitlab.ai/api-sdk-cli/de/sdks/build-ontologies-in-python.md). Das Projekt erhält eine eigene Kopie der Workspace-Ontologie, sodass spätere Änderungen im Projekt eine eigene Versionshistorie haben.

## Aktualisieren und löschen <a href="#update-and-delete" id="update-and-delete"></a>

```python
project = project.update(name="Pallet inspection v2", description="Second site")
project.delete()
```

`delete()` versetzt das Projekt in den Status gelöscht und plant die Bereinigung. Dafür ist ein Schlüssel nötig, den der Workspace-Owner oder der Ersteller des Projekts angelegt hat; jeder andere Schlüssel erhält `PermissionDeniedError`.

## Was ein Projekt-Handle bietet <a href="#what-a-project-handle-offers" id="what-a-project-handle-offers"></a>

| Bereich      | Methoden                                                                                              |
| ------------ | ----------------------------------------------------------------------------------------------------- |
| Daten        | `upload()`, `import_cloud()`, `attach_preview()`, `attach()`, `attached_sources()`, `detach_source()` |
| Verarbeitung | `batch_queues()`, `batch_queue(id)`, `scene_status()`, `retry_scene()`                                |
| Elemente     | `data_units()`                                                                                        |
| Labels       | `annotation_imports`, `mark_benchmarks()`                                                             |
| Arbeit       | `workflow`                                                                                            |

## Felder <a href="#fields" id="fields"></a>

| Feld                  | Bedeutung                           |
| --------------------- | ----------------------------------- |
| `id`                  | Projekt-ID                          |
| `name`, `description` | Wie in der App angezeigt            |
| `created`, `creator`  | Erstellungszeitpunkt und Ersteller  |
| `data_item_count`     | Anzahl der Arbeitselemente          |
| `ontology_hash`       | ID der Projektontologie oder `None` |

## Verwandte Themen <a href="#related" id="related"></a>

[Projekt-Uploads](https://docs.unitlab.ai/api-sdk-cli/de/sdks/project-uploads.md) · [Data Units](https://docs.unitlab.ai/api-sdk-cli/de/sdks/data-units.md) · [Workflow-Stages und Aufgaben](https://docs.unitlab.ai/api-sdk-cli/de/sdks/workflow-stages-and-tasks.md)
