skillfed

prefixmaps

A python library for retrieving semantic prefix maps

prefixmaps v0.2.6 328.0K downloads/30d#7,561 on PyPI14
Permissive license Apache-2.0 Active released

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 prefixmaps

uv

uv add prefixmaps

poetry

poetry add prefixmaps

Installing 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

Development Status :: 1 - PlanningLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Bio-Informatics

Tags

prefix map retrievalCURIE expansionsemantic namespace mappingRDF prefix managementontology prefix resolutioncompact URI expansionnamespace URI lookup
semantic-webrdfontology

More Bio-Informatics packages