> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encord.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ontologies Basics

Ontologies are top-level entities that can be attached to projects that provide a template structure for labels.

<Tip> For a detailed description about ontologies in the Encord platform go [here](/platform-documentation/Annotate/annotate-ontologies/annotate-ontologies).</Tip>

<Note>A Project can only have a single Ontology attached to it, but one Ontology can be attached to multiple Projects.</Note>

Each ontology is identified using a unique `<dataset_hash>` - a unique ID that can be found within a Dataset in the Encord platform, as highlighted below.

<div class="flex justify-center">
  <img src="https://storage.googleapis.com/docs-media.encord.com/static/img/ontology-id-highlighted.png" width="600" />
</div>

To access the Ontology use the [get\_ontology()](/sdk-documentation/sdk-references/user_client#get_ontology) method, that allows you to work with its structure property.

<CodeGroup>
  ```python theme={"dark"}
  from encord import EncordUserClient

  # Authenticate using the path to your private key (see
  # /sdk-documentation/general-sdk/authentication-sdk for more)
  user_client: EncordUserClient = EncordUserClient.create_with_ssh_private_key(
      ssh_private_key_path="<ENCORD_SSH_KEY_FILE>"
  )

  ontology = user_client.get_ontology("<ontology_hash>")

  ```

  ```python Output theme={"dark"}

  # The <ontology_hash>
  "505afc20-0658-44ab-9d62-dc8d940d8e11" 

  ```
</CodeGroup>

The structure comes as the `OntologyStructure` class.

<Note>Ontologies cannot be deleted using the SDK or the API. Use the Encord platform to delete an Ontology.</Note>

## View Ontology Structure

Use the following script to view the Ontology structure and all other Ontology attributes.

<CodeGroup>
  ```python View Ontology Structure Template theme={"dark"}
  from encord.user_client import EncordUserClient

  # Define constants
  SSH_PATH = "file-path-to-your-ssh-key"

  user_client = EncordUserClient.create_with_ssh_private_key(
      ssh_private_key_path=SSH_PATH
  )


  ontology = user_client.get_ontology("unique-id-of-your-ontology")

  print(ontology.ontology_hash)
  print(ontology.title)
  print(ontology.description)
  print(ontology.created_at)
  print(ontology.last_edited_at)
  print(ontology.structure)

  ```

  ```python Example theme={"dark"}

  from encord.user_client import EncordUserClient

  # Define constants
  SSH_PATH = "/Users/chris-encord/SSH/sdk-ssh-private-key.txt"

  user_client = EncordUserClient.create_with_ssh_private_key(
      ssh_private_key_path=SSH_PATH
  )

  ontology = user_client.get_ontology('b2421c7c-6ba6-48c9-93c0-3d3c015ad7b1')

  print(ontology.ontology_hash)
  print(ontology.title)
  print(ontology.description)
  print(ontology.created_at)
  print(ontology.last_edited_at)
  print(ontology.structure)

  ```
</CodeGroup>
