get_n2t_prefix

get_n2t_prefix(prefix: str) str | None[source]

Get the name-to-thing prefix if available.

Parameters:

prefix – The prefix to lookup.

Returns:

The Name-to-Thing prefix corresponding to the prefix, if mappable.

>>> import bioregistry
>>> bioregistry.get_n2t_prefix('chebi')
'chebi'
>>> bioregistry.get_n2t_prefix('ncbitaxon')
'taxonomy'
>>> assert bioregistry.get_n2t_prefix('MONDO') is None