> 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/ontology-resources.md).

# Ontologie-Ressourcen

Ontologie-Ressourcen im Python-SDK: Workspace-Ontologien auflisten, filtern, lesen, erstellen und aktualisieren, inklusive Feldern und Berechtigungen.

Workspace-Ontologien sind wiederverwendbar. Ein Projekt erhält eine eigene Kopie, wenn es mit einer Ontologie erstellt wird; spätere Änderungen an der Workspace-Ontologie wirken sich daher nicht auf bestehende Projekte aus.

```python
ontology = client.ontologies.create(
    "Robot cell QA",
    description="Grippers and parts on the inspection line",
    structure=structure,
)

for item in client.ontologies.list(title_like="Robot"):
    print(item.id, item.title, item.last_edited_at)

ontology = client.ontologies.get("ONTOLOGY_ID")
ontology.description = "Adds the Fixture class"
ontology.structure.add_object("Fixture", Shape.BOUNDING_BOX)
ontology.save()
```

`create()` stellt die Ontologie sofort bereit; es gibt keinen Veröffentlichungsschritt. `save()` schreibt `title`, `description` und `structure` und erfasst eine neue Revision.

## Listenfilter <a href="#list-filters" id="list-filters"></a>

| Filter                            | Trifft zu auf                       |
| --------------------------------- | ----------------------------------- |
| `title_eq`, `title_like`          | Exakten Titel oder Teil davon       |
| `desc_eq`, `desc_like`            | Exakte Beschreibung oder Teil davon |
| `created_before`, `created_after` | ISO-8601-Datum oder -Zeitstempel    |
| `edited_before`, `edited_after`   | ISO-8601-Datum oder -Zeitstempel    |

Archivierte Ontologien werden nicht aufgeführt.

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

| Feld                                | Bedeutung                                                                  |
| ----------------------------------- | -------------------------------------------------------------------------- |
| `id`                                | Ontologie-ID; übergeben Sie sie als `ontology_hash` an `projects.create()` |
| `title`, `description`, `structure` | Inhalt                                                                     |
| `data_type`                         | Kompatibilitätsfamilie, standardmäßig `image`                              |
| `created_at`, `last_edited_at`      | Zeitpunkte                                                                 |
| `project_id`                        | Gesetzt, wenn die Ontologie zu einem Projekt gehört                        |

Der Schlüssel benötigt **View ontology** zum Lesen und **Manage ontologies** zum Erstellen und Speichern.

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

[Ontologien in Python erstellen](https://docs.unitlab.ai/api-sdk-cli/de/sdks/build-ontologies-in-python.md) · [CLI: Ontologien und Cloud-Speicher](https://docs.unitlab.ai/api-sdk-cli/de/clis/cli-ontologies-and-cloud-storage.md)
