Projects tagged ‘python’ and ‘sparql’


Jump to tag:

Projects tagged ‘python’ and ‘sparql’

Filtered by Project Tags python sparql

Refine results Project Tags rdf (3) web (3) semanticweb (2) n3 (2) mql (1) rdfa (1) json (1) wiki (1) wsgi (1) semantic (1)

[5 total ]

7 Users
   

rdf handling library for python
Created over 2 years ago.

1 Users

Semantic, RDF-based wiki. Written in Python with Cherrypy and RDFlib.
Created about 1 year ago.

0 Users

SimpleSPARQL allows queries to SPARQL endpoints in a very simple language similar to MQL. The query language is designed specifically for python and uses python dictionaries in the same way as MQL. ... [More] Example Code: >>> from SimpleSPARQL import SimpleSPARQL >>> sparql = SimpleSPARQL("http://dbpedia.org/sparql") >>> n = sparql.n >>> n.bind('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#') >>> n.bind('rdfs', 'http://www.w3.org/2000/01/rdf-schema#') >>> n.bind('dbpedia2', 'http://dbpedia.org/property/') >>> # the area in Km^2 of things labeled England >>> print sparql.quickread({ >>> n.rdfs.label : u"England", >>> n.dbpedia2.areaKm : None >>> })[0] 130395 >>> # The Prime Minister of England's types >>> q = { >>> n.rdfs.label : u"England", >>> n.dbpedia2.primeMinister : { >>> n.rdf.type : None >>> } >>> } >>> for type in sparql.quickread(q) : >>> print type http://xmlns.com/foaf/0.1/Person http://dbpedia.org/class/yago/PrimeMinistersOfTheUnitedKingdom http://dbpedia.org/class/yago/ChancellorsOfTheExchequerOfTheUnitedKingdom http://dbpedia.org/class/yago/LeadersOfTheBritishLabourParty http://dbpedia.org/class/yago/AcademicsOfTheUniversityOfEdinburgh http://dbpedia.org/class/yago/RectorsOfTheUniversityOfEdinburgh http://dbpedia.org/class/yago/PeopleFromGlasgow http://dbpedia.org/class/yago/AcademicsOfTheOpenUniversity ... >>> for obj in sparql.read(q) : >>> print obj { rdflib.URIRef('http://dbpedia.org/property/primeMinister'):{ rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'): u'http://dbpedia.org/ontology/OfficeHolder#Class' }, rdflib.URIRef('http://www.w3.org/2000/01/rdf-schema#label'): u'England' } { rdflib.URIRef('http://dbpedia.org/property/primeMinister'):{ rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'): u'http://dbpedia.org/ontology/OfficeHolder#Class' }, rdflib.URIRef('http://www.w3.org/2000/01/rdf-schema#label'): u'England' } { rdflib.URIRef('http://dbpedia.org/property/primeMinister'):{ rdflib.URIRef('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'): u'http://dbpedia.org/ontology/OfficeHolder#Class' }, rdflib.URIRef('http://www.w3.org/2000/01/rdf-schema#label'): u'England' } ... >>> print sparql.ask({ n.rdfs.label : u"England", n.dbpedia2.primeMinister : { n.rdfs.label : u"Tony Blair" } }) False >>> # and if you could do writes to dbpedia: >>> obj = { >>> n.rdfs.label : "Hello World", >>> n.sparql.create : n.sparql.unless_exists >>> } >>> sparql.write(obj) [Less]
Created 12 months ago.

0 Users

Out of RDF TransmogrifyingThis project is a collection of libraries/tools aimed to facilitate instrumental use of RDF. Initially Oort holds a set of Python-implementations. The project itself aims ... [More] to be an umbrella for methods of using RDF in settings where code-centric objects, such as JSON (and "instrumental" xml) are easier to work with than full-fledged RDF. It is not about "hiding" RDF, just "encapsulating it with simplified lenses". Home PageSee also The official Oort home page. It currently describes: Python: Oort "rdfview"The main oort python package contains an rdfview module; basically a kind of O/R-mapper for RDF. Python: OortPubThe OortPub package contains a WSGI-based toolkit for creating RDF-driven web apps. It strives to make it easy to create web views of RDF Graphs by using fairly declarative python code. DepotA content depot ("repository") for resources along with descriptions of them.... coming up. SparqlTreeDigests SPARQL results for your convenience. See the SparqlTree page for more information. [Less]
Created about 1 year ago.

0 Users

It performs SELECT and ASK queries on an endpoint which implements the HTTP (GET or POST) bindings of the SPARQL Protocol. Typed literals are converted to their equivalent Python types. If isodate ... [More] module is present, date strings are parsed, and if rdflib is present, the URI literals are converted to URIRef objects, otherwise both types are treated as unicode strings. The API is based on SPARQL JavaScript Library by Lee Feigenbaum and Elias Torres. [Less]
Created about 1 year ago.