βΉοΈ Introduction
A cross-platform library for idiomatic conversion between URIs and compact URIs (CURIEs).
Uniform resource identifiers (URIs) and compact URIs (CURIEs) have become the predominant syntaxes for identifying concepts in linked data applications. Therefore, efficient, faultless, and idiomatic conversion between them is a crucial low-level utility whose need is ubiquitous across many codebases.
curies
fills this need. This cross-platform package can be used by a variety of people:
- Data Scientist - someone who consumes and modifies data to suit an analysis or application. For example, they might want to convert tabular data containing CURIEs into IRIs, translate into RDF, then query with SPARQL.
- Curator - someone who creates data. For example, an ontologist may want to curate using CURIEs but have their toolchain 1) validate the syntax and semantics and 2) convert to IRIs for their data persistence
- Data Consumer - someone who consumes data. This kind of user likely wonβt interact with
curies
directly, but will likely use tools that build on top of it. For example, someone using the Bioregistry resolution service uses this packageβs expansion utilities indirectly. - Software Developer - someone who develops tools to support data creators, data consumers, and other software developers. For example, a software developer might want to make their toolchain more generic for loading, merging, and outputting prefix maps and extended prefix maps.
For many users, expansion (CURIE to URI) and contraction (URI to CURIE) are the two most important tools. Example:
CURIE | URI |
---|---|
doid:1234 |
http://purl.obolibrary.org/obo/DOID_1234 |
β¨ Features
- π₯ Import converters from JSON prefix maps or JSON-LD context, with helper functions for popular converters, such as
get_obo_converter()
, or create a custom converter programmatically. - π Expand CURIEs from their compressed form to URIs.
- ποΈ Compress URIs to CURIEs.
- 𧩠Standardize prefixes, CURIEs, or URIs.
π¦οΈ Packaged for multiple interfaces
This library is packaged for easy use across various interfaces and languages:
- π¦ Rust developers: available as a Rust crate
curies
- π Python programmers: available as a Python pip package
curies-rs
- π JavaScript web developers: available as a NPM package
@biopragmatics/curies
, compiled to WebAssembly, for browser integrations with JavaScript, or NodeJS. - π R data scientists: soon available as a R package
curies
βοΈ Cross-platform support
It runs seamlessly on x86 and ARM architectures for many platforms:
- π§ Linux
- π MacOS
- πͺ Windows
- π¦ Web browsers
π‘ Need Help or Have Suggestions? We welcome your input and feedback! If you encounter any issues or have ideas to enhance this tool, please create an issue on our GitHub repository.