Skip to content
No description, website, or topics provided.
Python Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
simpot
tests
.gitignore
LICENSE
Makefile
README.md
install.txt
requirements.txt
saida.rdf
setup.cfg
setup.py

README.md

Object-triple Mapping

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

or:

$ pip install -i https://test.pypi.org/simple/ 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 = FOAF.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")
        self.name = Literal (name)
        self.email = URIRef(email) 

p = Person ("Donna Fales","donna", "mailto:donna@example.org")
print (graph(p).serialize())

https://docs.python-guide.org/writing/structure/#test-suite

You can’t perform that action at this time.