--- id: prefixmaps version: "0.2.6" license: Apache-2.0 license_treatment: permissive maintenance: active --- # prefixmaps — A python library for retrieving semantic prefix maps License: permissive · Maintenance: active · Downloads: 328.0K/mo ## 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 above — 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 pip install prefixmaps uv add prefixmaps 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_current - Install friction: low - Maintenance: active - Downloads: 328.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags prefix map retrieval, CURIE expansion, semantic namespace mapping, RDF prefix management, ontology prefix resolution, compact URI expansion, namespace URI lookup, semantic-web, rdf, ontology [View on SkillFed](https://skillfed.io/packages/prefixmaps) · [View on PyPI](https://pypi.org/project/prefixmaps/)