Most of the time I find myself writing a sort of well-known RDF graph structure, and I have to build it triple by triple. In the more general case, this well known graph structure is of course not guaranteed to be complete nor fixed (e.g. something else can be added). However, if a more or less invariant backbone exists, it would be nice to describe this backbone with placeholders and then pass a context to produce the fully deployed RDF graph.
For instance, an RDFAlchemy-model is an Python class. It could have default values, thus providing your "backbone". You could instantiate this class, update the relevant attributes and serialize this graph to RDFXML, Trutle, ntriples, ...
Along the lines of:
p = Person("Name")
o = Organisation("Name")
p.memberOf = o
serialize()