A Resource is an identifiable data object with a set of properties.
from kgforge.core import KnowledgeGraphForge
forge = KnowledgeGraphForge("../../configurations/demo-forge.yml")
from kgforge.core import Resource
It is possible to assign arbitrary properties to create a resource, and link them to other resources via properties.
jane = Resource(type="Person", name="Jane Doe")
association = Resource(type="Association", agent=jane)
jane.email = "jane.doe@epfl.ch"
jane.email
'jane.doe@epfl.ch'
association.agent.email
'jane.doe@epfl.ch'
print(jane)
{ type: Person email: jane.doe@epfl.ch name: Jane Doe }
print(association)
{ type: Association agent: { type: Person email: jane.doe@epfl.ch name: Jane Doe } }