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
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
Built Distribution
File details
Details for the file curieutil-0.0.5.tar.gz
.
File metadata
- Download URL: curieutil-0.0.5.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f05630ecb2e2b7daf230836cc349dd7dff082d63d120936ac367d3e0fd1c8b6e
|
|
MD5 |
100d68216ca25da55f629dd364569a72
|
|
BLAKE2b-256 |
eba127ac82b3eb4fb5c86e486370b470ab393b3b68985c38d16487df08e1ddd1
|
File details
Details for the file curieutil-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: curieutil-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9fc035ce86b30abddad0d7b8c8aa27c52a62e2377e72c306d5ff33224d0b8c92
|
|
MD5 |
e4330ab428f3e0f0002f0878a916efcf
|
|
BLAKE2b-256 |
b7f1661eb081e452e4b4ad78939ca3bcd5bebb600e078fcaaa061618f68a3fb3
|