URI Helpers
CURIE / URI helpers - expansion & compaction.
- uri_to_curie(uri: str) tuple[str, str, str][source]
Convert a URI to
(curie, prefix, namespace)via bioregistry.Falls back to splitting on
#or/when bioregistry is unavailable or the URI is unknown.
- make_expander(context: dict[str, str], br_map: dict[str, str] | None = None) Callable[[str], str][source]
Return a cached CURIE -> URI expander function.
The returned closure looks up context first, then br_map. Already-expanded URIs are returned unchanged. Results are cached for the lifetime of the closure.