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

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for pyrdf_prefix-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b28e7e1c2190d2322fc52f919cb8d2fa07ae806ff448051cc12150f269e9fb08
MD5 70d4d93507ac953700bab9c9824e37f4
BLAKE2b-256 02c08c67746c769acf66e5e7764470d1903c3b5a30f3a9ebf2c9f4eb89f773f3

See more details on using hashes here.

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

Hashes for pyrdf_prefix-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a51b23599b4041c9f58bae95886fe20d963ebe0f3708d71cb905a65df5404f50
MD5 d6722d4d1ac91368090595b690da16f8
BLAKE2b-256 b17d6c3ea76774cae40fcec5e3fcd7d7da40e4d29c465eb37c10df3f2b348bfc

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