Skip to main content

A simple Python object-triple mapping. ....

Project description

Simple Object-triple Mapping

Python application

1. Requirements

This module requires the rdflib package installation:

$ pip install rdflib

2. How to Install

For install this package execute the command in your environment:

$ pip install crdf-serializer


$ pip install -i crdf-serializer

3. How to use

import simpot

from rdflib import Namespace, Literal, URIRef,RDF
from simpot import RdfsClass, BNamespace, graph
from rdflib.namespace import DC, FOAF

# exemplo do rdflib
class Person:
    nick = FOAF.nick
    name =
    email = FOAF.mbox

    @RdfsClass(FOAF.Person, None) # blank node
    @BNamespace("dc", DC)
    @BNamespace("foaf", FOAF)
    def __init__ (self, name, nick, email):
        self.nick = Literal(nick, lang="foo") = Literal (name) = URIRef(email) 

p = Person ("Donna Fales","donna", "")
print (graph(p).serialize())

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for simpot, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size simpot-0.1.0-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size simpot-0.1.0.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page