{"id":8880,"library":"bioregistry","title":"Bioregistry","description":"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.","status":"active","version":"0.13.40","language":"en","source_language":"en","source_url":"https://github.com/biopragmatics/bioregistry.git","tags":["biology","bioinformatics","registry","CURIE","identifier","ontology","metaregistry","life-sciences"],"install":[{"cmd":"pip install bioregistry","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Command-line interface and utilities","package":"click","optional":false},{"reason":"Handling Compact URIs (CURIEs)","package":"curies","optional":false},{"reason":"Click utility extensions","package":"more-click","optional":false},{"reason":"Data validation and settings management","package":"pydantic","optional":false},{"reason":"Standardized file management","package":"pystow","optional":false},{"reason":"HTTP requests for external data","package":"requests","optional":false},{"reason":"Simple Standard for Sharing Ontology Mappings (SSSOM) Pydantic models","package":"sssom-pydantic","optional":false},{"reason":"Progress bars for iterations","package":"tqdm","optional":false}],"imports":[{"note":"Commonly imported directly or aliased as 'br'","symbol":"bioregistry","correct":"import bioregistry"},{"note":"Standard community alias for convenience","symbol":"br","correct":"import bioregistry as br"}],"quickstart":{"code":"import bioregistry as br\n\n# Get metadata for a resource\ntaxonomy_entry = br.get_resource('taxonomy')\nprint(f\"Taxonomy Name: {taxonomy_entry.name}\")\nprint(f\"Taxonomy Homepage: {taxonomy_entry.homepage}\")\n\n# Normalize a prefix\nnormalized_ec = br.normalize_prefix('ec-code')\nprint(f\"'ec-code' normalized to: {normalized_ec}\")\n\nnormalized_pubchem = br.normalize_prefix('pubchem')\nprint(f\"'pubchem' normalized to: {normalized_pubchem}\")\n\n# Resolve a CURIE to a URI\ncurie = 'chebi:138488'\nuri = br.resolve(curie)\nprint(f\"Resolved {curie} to: {uri}\")\n\n# Expand a CURIE to a URI\nexpanded_uri = br.expand_curie(curie)\nprint(f\"Expanded {curie} to: {expanded_uri}\")","lang":"python","description":"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."},"warnings":[{"fix":"Review and adapt any pipelines that rely on Bioregistry's output for case-sensitive prefix handling, especially for non-biological or common data prefixes. Consider explicit case normalization in consuming applications if strict lowercase is required.","message":"Changes in Bioregistry's internal canonicalization for certain non-biological prefixes (e.g., 'rdf') can lead to unexpected case changes (e.g., 'RDF' instead of 'rdf') in merged prefix maps, affecting downstream tools that consume Bioregistry's output and assume lowercase canonicalization for such prefixes.","severity":"breaking","affected_versions":"0.13.x (observed around 0.13.x in April 2024)"},{"fix":"Always check for prefix existence and metadata completeness using `br.get_resource()` or `br.normalize_prefix()`. If a prefix is missing, consider contributing it or consulting the original external registry directly.","message":"The Bioregistry does not fully cover or align with all external registries due to varying quality standards, lack of metadata, or resources being decommissioned. This means some prefixes from external sources may not be present or have complete metadata.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Before resolving, use `br.get_resource(prefix)` to check if a prefix is registered and has associated metadata, including a `pattern` for validation and `providers` for resolution. Validate identifiers using `br.validate_identifier()` if necessary.","message":"CURIEs can fail to resolve or validate for three main reasons: the prefix is not registered, the identifier does not match the validation pattern, or no providers are available for that prefix. The `resolve()` and `expand_curie()` functions will return `None` or raise an error in these cases.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Be aware of potential redundant prefixes in identifiers, especially when working with OBO Foundry or Gene Ontology resources. The Bioregistry's `normalize_prefix()` and `parse_curie()` functions are designed to handle these variations consistently.","message":"Some ontology identifiers embed redundant prefixes (e.g., `GO:GO:0006915`). Bioregistry handles these cases, but this can be a source of confusion as different registries might manage these 'banana-style' identifiers differently.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Always check if the result of `br.get_resource()` or `br.normalize_prefix()` is `None` before attempting to access its attributes. Example: `entry = br.get_resource('unknown_prefix'); if entry: print(entry.name)`.","cause":"Attempting to access attributes (e.g., `name`, `homepage`) on a `None` object returned by `bioregistry.get_resource()` or `bioregistry.normalize_prefix()`, indicating that the requested prefix is not recognized or found in the Bioregistry.","error":"AttributeError: 'NoneType' object has no attribute 'name' (or similar for other attributes)"},{"fix":"Verify the identifier's format against the expected pattern, which can sometimes be found in the resource's metadata via `br.get_resource(prefix).pattern`. Ensure the prefix itself is valid and has registered providers for resolution.","cause":"The provided identifier part of the CURIE ('invalid_id') does not conform to the expected regular expression pattern defined for the 'prefix' in the Bioregistry, or there are no configured providers to generate a URI for that prefix.","error":"Failed to resolve CURIE 'prefix:invalid_id' / No URI found for 'prefix:invalid_id'"}]}