ontopy

Simple RDF to Python mapper built on top of rdflib
Download

ontopy Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Ben Godfrey
  • Publisher web site:
  • http://ben2.com

ontopy Tags


ontopy Description

Simple RDF to Python mapper built on top of rdflib ontopy allows you to manipulate RDF data stored remotely as Python data structures. Ontopy includes a SPARQL query builder for accessing sets of resources behind SPARQL endpoints.Installation:Use setuptools to install Ontopy. easy_install ontopyUsage:Declare resource classes as Python classes. >>> class Band(RDFClass): ... endpoint_uri = "http://dbpedia.org/sparql" ... prefix = "http://dbpedia.org/ontology/" ... label = "Band" # optional - class name used as defaultInteract with their data in a nice friendly Python way: >>> Band.resources < Band: http://dbpedia.org/resource/!!! > >>> kraftwerk = Band("http://dbpedia.org/resource/Kraftwerk") >>> kraftwerk < Band: http://dbpedia.org/resource/Kraftwerk >RDF property names are commonly URIs. rdflib namespaces provide convenient shortcuts for names. >>> from rdflib.namespace import RDFS >>> kraftwerk u'Kraftwerk' Requirements: · Python


ontopy Related Software