No project description provided
Project description
The Simpsons in RDF
This is an example file modeling the Simpsons Family in RDF. It was originally taken from
http://sws.ifi.uio.no/inf3580/v15/oblig/3/simpsons.ttl
where it is part of an assignment:
https://www.uio.no/studier/emner/matnat/ifi/INF3580/v17/undervisningsmateriale/oblig_4.pdf
I have slightly adopted it and moved it to the <https://simpsons.example.org/>
namespace.
The simpsons graph is also included in the JekyllRDF tutorial: https://github.com/white-gecko/JekyllRDF-Tutorial/blob/master/_data/graph.ttl (JekyllRDF)
Usage in Python
To use it in python do:
pip install simpsons-rdf
or
poetry add simpsons-rdf
use it like:
from simpsons import simpsons, SIM, FAM
print({p: o for _, p, o in simpsons.graph.triples((SIM.Homer, None, None))})
print([spouse for _, _, spouse in simpsons.graph.triples((SIM.Homer, FAM.hasSpouse, None))])
print(simpsons.graph.serialize(format="turtle"))
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
Built Distribution
File details
Details for the file simpsons_rdf-0.1.0.tar.gz
.
File metadata
- Download URL: simpsons_rdf-0.1.0.tar.gz
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.11.5-200.fc40.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e57eed0016a6605b2315daf0e59bd46c6189e702f642288c9170c17396a3475 |
|
MD5 | 298a187b4879f79f43772eec7154864c |
|
BLAKE2b-256 | 30a01a846a3af4b5bfa1179043ae5bb6e58c0f72d12f23d0afa7d606f369af3c |
File details
Details for the file simpsons_rdf-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: simpsons_rdf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.11.5-200.fc40.x86_64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6920eff8d2a03eaabb4015bf16436600d982e2909081abf355f3209cefbc7d41 |
|
MD5 | 464830eb04598fdaccd4dcd703349df2 |
|
BLAKE2b-256 | 578754dabfd7a0b7b2f479d406d99abfb9ba4a5e8b48d58573bf870f3b8319dc |