Skip to main content

Simple Object-triple Mapping

Python package

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 simpot

or:

$ pip install -i https://test.pypi.org/simple/ simpot

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

Release files for simpot 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for simpot 0.4.0
File Size Uploaded
simpot-0.4.0.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for simpot 0.4.0
File Interpreter ABI Platform
simpot-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.0 kB

Release files / simpot-0.4.0.tar.gz

Download URL simpot-0.4.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cf58d9262ee84d639e2d1833d53bcd56f88fd28aa0b32e9d26927e0d8e9d78c2
BLAKE2b-256 checksum
How to use checksums
d7a57208a0d6f450faa9e67bc0619ca8055e9149788f8f3a148d1193df1c951e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release files / simpot-0.4.0-py3-none-any.whl

Download URL simpot-0.4.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d261918fea79defc2cd3533dde041c9a87a3b209091b99cdfa0ae48a834c965
BLAKE2b-256 checksum
How to use checksums
dc4d87b10f440a974644352a0f8cc5278e50e1f8c22436b4c66eb562b5aba5f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page