Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Semantic Web and RDF library for Python
branch: master

This branch is 169 commits ahead of npilon:master

Have JSON parser work with pre parsed json

* Avoid requring a raw string if we already have a json object
latest commit d185d61065
@gcarothers gcarothers authored
Failed to load latest commit information.
docs The NOT is rather key
examples Adding foaf bond
pymantic Have JSON parser work with pre parsed json
.gitignore Ignore build directory too.
LICENSE Updated documentation, updated copyright info, updated version
README.rst User Prefix not Namespace
pymantic.wpr Bringing up to date with RDF Interfaces from W3C
setup.cfg First commit bnf2html tool for Turtle



Semantic Web and RDF library for Python

Quick Start

>>> from pymantic.rdf import *
>>> from pymantic.parsers import turtle_parser
>>> from urllib2 import urlopen
>>> Resource.prefixes['foaf'] = Prefix('')
>>> graph = turtle_parser.parse(urlopen(''))
>>> bond_james = Resource(graph, '')
>>> print "%s knows:" % (bond_james.get_scalar('foaf:name'),)
>>> for person in bond_james['foaf:knows']:
        print person.get_scalar('foaf:name')


Pymantic requires Python 2.6 or higher. Lepl is used for the Turtle and NTriples parser. httplib2 is used for HTTP requests and the SPARQL client. simplejson and lxml are required by the SPARQL client as well.


$ python install

This will install Pymantic and all its dependencies.


Generating a local copy of the documentation requires Sphinx:

$ easy_install Sphinx
Something went wrong with that request. Please try again.