get_property

get_property(prefix, identifier, prop, **kwargs)[source]

Extract a single property for the given entity.

Parameters:
  • prefix (str) – the resource to load

  • identifier (str) – the identifier withing the resource

  • prop (NormalizedNamableReference | Referenced | Reference | NamedReference | tuple[str, str] | str) – the property to extract

  • kwargs (Unpack[GetOntologyKwargs])

Returns:

The single value for the property. If multiple are expected, use get_properties()

Return type:

str | None

>>> import pyobo
>>> pyobo.get_property("chebi", "132964", "http://purl.obolibrary.org/obo/chebi/smiles")
"C1(=CC=C(N=C1)OC2=CC=C(C=C2)O[C@@H](C(OCCCC)=O)C)C(F)(F)F"