.. image:: docs/_static/wiseoldman_small.png :alt: Wise old man from https://openclipart.org/detail/190655/wise-old-man-by-j4p4n-190655
OldMan is a Python Object Linked Data Mapper (OLDM).
An OLDM let you create, retrieve and update RDF representations of Web Resources by manipulating them as Python objects.
OldMan, in its core, is based on two W3C standards:
RDF (the Resource Description Framework) <http://www.w3.org/TR/rdf11-concepts/>
_ as data model;JSON-LD context <http://www.w3.org/TR/json-ld/#the-context>
_ for mapping objects and RDF graphs.It is designed to support multiple protocols for interacting with data stores hosting these resources.
Currently, only SPARQL <http://www.w3.org/TR/sparql11-overview/>
_ is officially supported.
OldMan relies on the RDFlib <https://github.com/RDFLib/rdflib/>
_ Python library.
Some similar projects employ the term Object RDF Mapper for denoting the mapping between objects and RDF graphs. This terminology uses the same initials than the well-known notion of Object Relational Mapper (ORM) that consider table rows instead of RDF graphs.
The Object Linked Data Mapper (OLDM) term avoids this confusion. It also emphasizes that the manipulated resources are supposed to be on the Web, not just in a local database. It should lead users to interact with data stores on which they not always have full control (e.g. a tiers Web API).
OldMan has one main objective: help you to declare your models using RDF triples and JSON-LD contexts instead of programming Python model classes yourself.
However, OldMan does not force you to express all your domain logic in a declarative style. OldMan makes easy for you to add dynamically plain-old Python methods to resource objects.
By adopting a declarative style:
It also acknowledges that IRIs or compact URIs (CURIEs) <http://www.w3.org/TR/curie/>
_ -like strings
are not always pleasant to use: arbitrary short names and objects are usually more user-friendly.
However, you can still manipulate IRIs when it is relevant for you to do so. Everything remains mapped to IRIs.
http://oldman.readthedocs.org/en/latest/quickstart.html
http://oldman.readthedocs.org/en/latest/
Resource-centric validation based on RDF vocabularies:
Hydra
: hydra:required
, hydra:readonly
and hydra:writeonly
;foaf:mbox <http://xmlns.com/foaf/spec/#term_mbox>
_);JSON-LD collections <http://www.w3.org/TR/json-ld/#sets-and-lists>
_ (set, list and language maps);dogpile.cache <https://bitbucket.org/zzzeek/dogpile.cache>
_ library... _Hydra: http://www.hydra-cg.com/spec/latest/core/ .. _hydra:required: http://www.hydra-cg.com/spec/latest/core/#hydra:required .. _hydra:readonly: http://www.hydra-cg.com/spec/latest/core/#hydra:readonly .. _hydra:writeonly: http://www.hydra-cg.com/spec/latest/core/#hydra:writeonly
.. image:: https://api.travis-ci.org/oldm/OldMan.svg?branch=master :target: https://travis-ci.org/oldm/OldMan
.. image:: https://coveralls.io/repos/oldm/OldMan/badge.png :target: https://coveralls.io/r/oldm/OldMan
OldMan is a young project under active development started in April 2014.
Feel free to contribute <https://github.com/oldm/OldMan>
_ and to subscribe
to our mailing list oldman AT librelist.com
.
Only Python 2.7 is currently supported, but support for Python 3.x is of course something we would like to consider.
See our issue tracker <https://github.com/oldm/OldMan/issues>
_.