Utility library for the work with ontology namespaces.
Project description
namespacelib
Utility library for the work with ontology namespaces.
Usage
The namespaces interfaces implemented in this package allow to get the URI as a class property. Implementation similar
to
rdflib, which has implemented popular ontologies, like prov:
import rdflib
print(rdflib.PROV.Agent)
# rdflib.URIRef('http://www.w3.org/ns/prov#Agent')
Note, that you may access these namespaces also through namespaclib as it just
"forwards" to rdflib.
Other namespaces, like M4I can be accessed like this:
import namespacelib
print(namespacelib.M4I.Tool)
# rdflib.URIRef('http://w3id.org/nfdi4ing/metadata4ing#Tool')
Very helpful for scientific data are the unit vocabulary qudt:
import namespacelib
print(namespacelib.QUDT_UNIT.M_PER_SEC)
# rdflib.URIRef('http://qudt.org/vocab/unit/M-PER-SEC')
print(namespacelib.QUDT_KIND.Velocity)
# rdflib.URIRef('http://qudt.org/vocab/quantitykind/Velocity')
An URI, that does not exist will raise an error (Other than rdflib, which can raise an
AttributeError but does not by default!:
import namespacelib
# will raise an AttributeError:
print(namespacelib.QUDT_UNIT.METER)
Available namespaces:
Limitations
Some vocabularies are not complete because names start with a digit, include a "#" or are called "yield", "True" or "False" (see schema.org, for example). These are not implemented in this package.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file namespacelib-0.4.0.tar.gz.
File metadata
- Download URL: namespacelib-0.4.0.tar.gz
- Upload date:
- Size: 610.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01be0a6cfe0378bb47e833987bbb8e42164660f3770f632e5a351f10b27adfbb
|
|
| MD5 |
a0374c68c6d666adc3c151fbada43d5c
|
|
| BLAKE2b-256 |
40c945538f86261cb02db668f2ac1f088b8dea22e03e30b62e8b63182fa31d15
|
File details
Details for the file namespacelib-0.4.0-py3-none-any.whl.
File metadata
- Download URL: namespacelib-0.4.0-py3-none-any.whl
- Upload date:
- Size: 640.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e382a6cfb1dad4e367dbe5b7dd246c94bd3a8f98d02459a6e8daa986e6ad4209
|
|
| MD5 |
f236df721e45cc699269684f509c34de
|
|
| BLAKE2b-256 |
0c0f14584c9dde640941aeacafa2ba5683ea9e426b15664b4bbe9b433ded7fed
|