Skip to main content

Extra tools for rdflib

Project description

Extra command line tools for rdflib

This package provides some additional command line tools for rdflib:

  • SPARQL Query execution with optional reasoning using OWL-RL:
    rdflib-xtl sparql --help
    
  • OWL Reasoning using OWL-RL
    rdflib-xtl reason --help
    

Usage examples:

# Install pipx
pip3 install --user --upgrade pipx

# (optionally) clear pipx cache if you want the latest version ...
\rm -vr ~/.local/pipx/.cache/

# check version
pipx run --spec aucampia.rdflib-xtl rdflib-xtl --version

# Run SPARQL without reasoning ...
pipx run --spec aucampia.rdflib-xtl \
  rdflib-xtl sparql \
  -q 'SELECT * WHERE { ?s rdfs:subClassOf owl:Thing. }' \
  http://xmlns.com/foaf/spec/index.rdf

# Dump input graph with SPARQL query ...
pipx run --spec aucampia.rdflib-xtl \
  rdflib-xtl sparql \
  -q 'CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o }' \
  http://xmlns.com/foaf/spec/index.rdf

# Run SPARQL with reasoning ...
pipx run --spec aucampia.rdflib-xtl \
  rdflib-xtl sparql --reason \
  -q 'SELECT * WHERE { ?s rdfs:subClassOf owl:Thing. }' \
  http://xmlns.com/foaf/spec/index.rdf

# Dump reasoned graph with SPARQL query ...
pipx run --spec aucampia.rdflib-xtl \
  rdflib-xtl sparql --reason \
  -q 'CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o }' \
  http://xmlns.com/foaf/spec/index.rdf

# Run reasoning ...
pipx run --spec aucampia.rdflib-xtl \
  rdflib-xtl reason http://xmlns.com/foaf/spec/index.rdf

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

aucampia.rdflib-xtl-0.6.0.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

aucampia.rdflib_xtl-0.6.0-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

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