get_property

pyobo.get_property(prefix, identifier, prop)[source]

Extract a single property for the given entity.

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

  • identifier (str) – the identifier withing the resource

  • prop (str) – the property to extract

Return type:

Optional[str]

Returns:

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

>>> 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"