Easily access common RDF vocabularies and your own custom namespaces, for usage with pyoxigraph
Project description
pyrdf-prefix
This project provides a Prefix
utility and many predefined prefixes for many popular RDF vocabularies, like RDFS, SHACL, SKOS and OWL.
It returns NamedNode
s to be used with pyoxigraph.
Usage
from pyoxigraph import NamedNode
from pyrdf_prefix import Prefix
EX = Prefix('https://example.org/ns#')
assert EX.Sponge == NamedNode('https://example.org/ns#Sponge')
assert EX['Crusty-Crab'] == NamedNode('https://example.org/ns#Crusty-Crab')
It also predefines many well-known prefixes, like rdf
, skos
, sh
:
from pyrdf_prefix import RDF, SKOS, SH
from pyoxigraph import Quad
def describe():
return Quad(EX.MyRestaurant, RDF.type, SKOS.Concept)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyrdf_prefix-0.2.1.tar.gz
(231.3 kB
view details)
Built Distribution
pyrdf_prefix-0.2.1-py3-none-any.whl
(249.7 kB
view details)
File details
Details for the file pyrdf_prefix-0.2.1.tar.gz
.
File metadata
- Download URL: pyrdf_prefix-0.2.1.tar.gz
- Upload date:
- Size: 231.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b28e7e1c2190d2322fc52f919cb8d2fa07ae806ff448051cc12150f269e9fb08 |
|
MD5 | 70d4d93507ac953700bab9c9824e37f4 |
|
BLAKE2b-256 | 02c08c67746c769acf66e5e7764470d1903c3b5a30f3a9ebf2c9f4eb89f773f3 |
File details
Details for the file pyrdf_prefix-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: pyrdf_prefix-0.2.1-py3-none-any.whl
- Upload date:
- Size: 249.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a51b23599b4041c9f58bae95886fe20d963ebe0f3708d71cb905a65df5404f50 |
|
MD5 | d6722d4d1ac91368090595b690da16f8 |
|
BLAKE2b-256 | b17d6c3ea76774cae40fcec5e3fcd7d7da40e4d29c465eb37c10df3f2b348bfc |