Skip to main content

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 NamedNodes 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


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.0.tar.gz (231.3 kB view details)

Uploaded Source

Built Distribution

pyrdf_prefix-0.2.0-py3-none-any.whl (249.7 kB view details)

Uploaded Python 3

File details

Details for the file pyrdf_prefix-0.2.0.tar.gz.

File metadata

  • Download URL: pyrdf_prefix-0.2.0.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

Hashes for pyrdf_prefix-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5bcd78fd436528a0bde810aaf08645330a0028cecd9bea3e75000e4650ed660b
MD5 d312f310294f9107b346384b3f8db805
BLAKE2b-256 d690843deab26b68c1fc5ab957ccabcabdb93e8f6c9400460d2c2d0022b57010

See more details on using hashes here.

File details

Details for the file pyrdf_prefix-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyrdf_prefix-0.2.0-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

Hashes for pyrdf_prefix-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3061f14bd8c85c1eccd8a923897e9beb9106f7496c6f92cfe5575c6feacc3860
MD5 edae4698012486a01acef12ebf543628
BLAKE2b-256 df40e1a84eda620de31e01fa509c822290d62b3adc400dbd5481a8a0cafe43da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page