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 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.3.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for curieutil-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 045310045401b2451fd935c127f3399844bae8b8b8c2c6ea6e65b60acc22f33a |
|
MD5 | c1f80eb7e568931b44221506349d5bd7 |
|
BLAKE2b-256 | 1327204dfbb2a55559bef755149cb566c409a2ad7f12714b9da668535b7214d2 |