Skip to main content

Semantic Web and RDF library for Python

Project description

Quick Start

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


pymantic requires Python 3.6 or higher. lark is used for the Turtle and NTriples parser. The requests library is used for HTTP requests and the SPARQL client. lxml and rdflib are required by the SPARQL client as well.


$ pip install pymantic

This will install pymantic and all its dependencies.


Generating a local copy of the documentation requires Sphinx:

$ pip install Sphinx

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

pymantic-0.3.0.tar.gz (48.2 kB view hashes)

Uploaded source

Built Distribution

pymantic-0.3.0-py3-none-any.whl (60.7 kB view hashes)

Uploaded py3

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