say hello
Project description
Curie Util
Python Library to translate CURIEs to IRIs and vice versa. Python version based on the Java Implementation: https://github.com/prefixcommons/curie-util and the JavaScript Implementation: https://github.com/geneontology/curie-util-es5
Install
pip install curieutil
Usage
Retrieve a JSON-LD file such as: https://github.com/prefixcommons/biocontext/blob/master/registry/go_context.jsonld
import requests
url = 'https://raw.githubusercontent.com/prefixcommons/biocontext/master/registry/go_context.jsonld'
r = requests.get(url)
Then create a CurieUtil object:
from src.curieutil import CurieUtil
mapping = CurieUtil.parseContext(r.json())
curie = CurieUtil(mapping)
Get IRI
curie.getIri("ZFIN:ZDB-GENE-031112-7");
curie.getIri("MGI:MGI:34340");
Get CURIE
curie.getCurie("http://identifiers.org/zfin/ZDB-GENE-031112-7");
curie.getCurie("http://identifiers.org/mgi/MGI:34340");
Notes
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
curieutil-0.0.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for curieutil-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30c3cd2a63ca0e990e3cf5a09b477af2c1c4424c6895d92263210e0d15433257 |
|
MD5 | 04863802ba5e76a1cea4e7c33a5b7887 |
|
BLAKE2b-256 | 3d94d5f2ad99c6133030f6d6a09efbe0731361a96229bef509c89f5e4db905d7 |