prefixcommons
A python API for working with ID prefixes in the context of prefixcommons
Current functionality: Uses JSON-LD contexts to expand and contract CURIEs to URIs
E.g. GO:0008150 <=> http://purl.obolibrary.org/obo/GO_0008150
Example
>>> from prefixcommons import contract_uri
>>> print(contract_uri('http://purl.obolibrary.org/obo/GO_0008150'))
['GO:0008150']
>>> from prefixcommons import expand_uri
>>> print(expand_uri('GO:000850'))
http://purl.obolibrary.org/obo/GO_0008150
The above uses standard JSON-LD context files from prefixcommons/biocontext
You can pass your own
>>> cmaps = [{'GO': 'http://purl.obolibrary.org/obo/GO_'}]
>>> print(contract_uri('http://purl.obolibrary.org/obo/GO_0008150'), cmaps)
['GO:0008150']
Release files for prefixcommons 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| prefixcommons-0.1.12.tar.gz | 24.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prefixcommons-0.1.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.5 kB
Release files / prefixcommons-0.1.12.tar.gz
| Download URL | prefixcommons-0.1.12.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22c4e2d37b63487b3ab48f0495b70f14564cb346a15220f23919eb0c1851f69f
|
|
BLAKE2b-256 checksum How to use checksums |
7db5c5b63a4bf5dedb36567181fdb98dbcc7aaa025faebabaaffa2f5eb4b8feb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.7 Darwin/20.6.0
|
Release files / prefixcommons-0.1.12-py3-none-any.whl
| Download URL | prefixcommons-0.1.12-py3-none-any.whl |
|---|---|
| Size | 29.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16dbc0a1f775e003c724f19a694fcfa3174608f5c8b0e893d494cf8098ac7f8b
|
|
BLAKE2b-256 checksum How to use checksums |
31e8715b09df3dab02b07809d812042dc47a46236b5603d9d3a2572dbd1d8a97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.7 Darwin/20.6.0
|