--- id: prefixcommons version: "0.1.12" license: unclear license_treatment: permissive maintenance: dormant --- # prefixcommons — A python API for working with ID prefixes License: permissive · Maintenance: dormant · Downloads: 307.2K/mo ## What it is and what it does prefixcommons is a Python library that converts between compact identifier notation (CURIEs) and their full Uniform Resource Identifiers (URIs) using JSON-LD context files. It ships with standard contexts that map biomedical ontology prefixes to their canonical URIs—for example, GO:0008150 expands to http://purl.obolibrary.org/obo/GO_0008150. The core functions are expand_uri (CURIE to URI) and contract_uri (URI to CURIE), and you can supply your own context maps as dictionaries if the built-in ones don't fit your use case. The package is designed for workflows where you need to normalize identifier formats across biomedical ontologies. It depends on requests, click, pytest-logging, and PyYAML. The codebase is dormant (last release 2022-07-19), though the repository remains active, so it is not abandoned but not actively developed. Use it for: - Normalize biomedical ontology identifiers in data pipelines by converting CURIEs to full URIs. - Batch expand or contract identifiers when integrating data from multiple ontology sources. - Define custom prefix-to-URI mappings for domain-specific identifier schemes. - Validate and standardize identifier formats in bioinformatics ETL workflows. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts between CURIEs (compact URI identifiers like GO:0008150) and full URIs using JSON-LD contexts. Yes, if you work with biomedical ontologies or need CURIE-to-URI conversion. The package is stable, has no known vulnerabilities, and low install friction. The dormant maintenance status is a minor concern for a specialized tool—monitor the repository if you depend on current ontology prefix definitions, but core functionality is unlikely to break. ## Install pip install prefixcommons uv add prefixcommons poetry add prefixcommons ## Installing prefixcommons Before you install: Low friction: pure Python wheel with four common runtime dependencies (requests, click, pytest-logging, PyYAML). Maintenance is dormant—last release 2022-07-19, though repository has recent commits. License in practice: Licensed under BSD (permissive), so you can use and modify the package freely in most contexts without restriction. Quickstart: pip install prefixcommons from prefixcommons import expand_uri, contract_uri print(expand_uri('GO:0008150')) print(contract_uri('http://purl.obolibrary.org/obo/GO_0008150')) Verify before relying: - Whether the standard JSON-LD context files are kept current with latest ontology prefix definitions. - Performance characteristics when expanding or contracting large batches of identifiers. - Whether custom context maps support the full JSON-LD specification or a subset. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 307.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags CURIE to URI conversion, ontology identifier expansion, prefix commons, JSON-LD context resolution, OBO identifier mapping, ontology-identifiers, biomedical-data, semantic-web [View on SkillFed](https://skillfed.io/packages/prefixcommons) · [View on PyPI](https://pypi.org/project/prefixcommons/)