prefixmaps
A python library for retrieving semantic prefix maps
What it is and what it does
Prefixmaps is a Python library that aggregates semantic prefix maps from multiple sources (OBO, Bioregistry, prefix.cc, linked data) and provides a unified interface to expand compact URIs (CURIEs) into full namespace URIs. It is designed primarily for RDF document generation and tools that need to resolve short-form identifiers to semantic namespaces.
The library handles prefix collisions across sources by allowing you to specify a priority ordering of prefix maps. It includes built-in data files for reproducibility and network independence, with an optional refresh mode to fetch the latest upstream definitions. It depends on curies for the actual expansion logic and pyyaml for configuration handling.
Use it for:
- Expand compact identifiers like 'CHEBI:1' to full RDF URIs in ontology-based applications.
- Generate RDF document headers with appropriate prefix declarations from multiple semantic sources.
- Resolve prefix collisions when integrating multiple ontologies or identifier systems with custom priority ordering.
- Build tools that convert short-form biomedical identifiers to resolvable URIs for linked data.
- Maintain reproducible prefix mappings without network dependencies by using versioned data files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Retrieves and manages semantic prefix maps that convert compact URIs (like `skos`) to their full namespace URIs, with support for multiple sources and clash-resilient prefix ordering.
Yes, if you work with RDF, ontologies, or semantic web technologies. The package is actively maintained, has low install friction, carries no security vulnerabilities, and solves a real problem in prefix management. The Development Status 1 classifier is a caution flag—verify that the API stability and performance meet your needs before adopting in production.
Install
prefixmaps on PyPI
pip
pip install prefixmapsuv
uv add prefixmapspoetry
poetry add prefixmapsInstalling prefixmaps
Before you install
Low install friction with just two runtime dependencies (curies and pyyaml). Active maintenance with recent commits; however, the package is marked as Development Status 1 - Planning, suggesting it may still be stabilizing.
License in practice
Licensed under Apache-2.0 (permissive), allowing broad use including in commercial projects with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install prefixmaps
from prefixmaps import load_converter
from curies import Converter
converter: Converter = load_converter(["obo", "bioregistry.upper", "linked_data"])
converter.expand("CHEBI:1")
# Returns: 'http://purl.obolibrary.org/obo/CHEBI_1'
Verify before relying
- Whether the package's performance characteristics meet production requirements (TODO noted in description for 'fast').
- Stability guarantees given the Development Status :: 1 - Planning classifier despite active maintenance.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — curies, pyyaml |
| Maintenance | actively maintained — 666 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 327,984/month — #7,561 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: prefixmaps-0.2.6-py3-none-any.whl
Keywords: semantic web, bioinformatics
Tags
More Bio-Informatics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
biopythonBiopython provides Python tools for…
unclear · top 5,000 on PyPI
firecrawl-pyClient library for the Firecrawl API that…
permissive · top 5,000 on PyPI
intervaltreeA self-balancing interval tree data structure…
permissive · top 5,000 on PyPI
albumentationsAlbumentations applies image transformations to…
permissive · top 5,000 on PyPI
PubChemPyPubChemPy is a Python wrapper around the…
permissive · top 5,000 on PyPI
prefixcommonsConverts between CURIEs (compact URI…
permissive · top 15,000 on PyPI
curiesConverts between URIs and compact URIs (CURIEs)…
permissive · top 15,000 on PyPI
sssomParse, validate, and convert SSSOM (Simple…
permissive · top 15,000 on PyPI
semantic-link-functions-geopandasAdds geospatial semantic functions to…
permissive · top 15,000 on PyPI
smmapSmmap provides a sliding-window memory map…
permissive · top 1,000 on PyPI
SPARQLWrapperSPARQLWrapper provides a Python interface to…
unclear · top 5,000 on PyPI
linkmlLinkML is a modeling language for defining…
permissive · top 15,000 on PyPI
rdflibRDFLib is a Python library for parsing,…
permissive · top 1,000 on PyPI
edam-ontologyProvides a Python-packaged version of the EDAM…
permissive · top 15,000 on PyPI