get_uri_prefix

get_uri_prefix(prefix, priority=None)[source]

Get a well-formed URI prefix for usage in a prefix map.

Parameters
  • prefix (str) – The prefix to lookup.

  • priority (Optional[Sequence[str]]) – The prioirty order for get_format().

Return type

Optional[str]

Returns

The URI prefix. Similar to what’s returned by bioregistry.get_format(), but it MUST have only one $1 and end with $1 to use thie function.

>>> import bioregistry
>>> bioregistry.get_uri_prefix('chebi')
'https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:'