Bioregistry

0.13.40 · active · verified Thu Apr 16

The Bioregistry is an integrative, open, community-driven meta-registry of databases, ontologies, and other nomenclature resources in the life sciences. It provides a Python package for common tasks like metadata lookup, CURIE expansion, and URI contraction. The library is actively maintained with frequent updates and a continuous release cadence, currently at version 0.13.40.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to fetch metadata for a given resource, normalize various forms of a prefix to its canonical Bioregistry form, and resolve/expand a Compact URI (CURIE) into a full URI.

import bioregistry as br

# Get metadata for a resource
taxonomy_entry = br.get_resource('taxonomy')
print(f"Taxonomy Name: {taxonomy_entry.name}")
print(f"Taxonomy Homepage: {taxonomy_entry.homepage}")

# Normalize a prefix
normalized_ec = br.normalize_prefix('ec-code')
print(f"'ec-code' normalized to: {normalized_ec}")

normalized_pubchem = br.normalize_prefix('pubchem')
print(f"'pubchem' normalized to: {normalized_pubchem}")

# Resolve a CURIE to a URI
curie = 'chebi:138488'
uri = br.resolve(curie)
print(f"Resolved {curie} to: {uri}")

# Expand a CURIE to a URI
expanded_uri = br.expand_curie(curie)
print(f"Expanded {curie} to: {expanded_uri}")

view raw JSON →