get_uri_prefix

get_uri_prefix(prefix: str, priority: Sequence[str] | None = None) str | None[source]

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

Parameters:
  • prefix – The prefix to lookup.

  • priority – The prioirty order for get_format().

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')
'http://purl.obolibrary.org/obo/CHEBI_'