Cant think of an example, but the basic procudure is to follow the set_metadata() function in metadata/epub.py. Something like
Code:
reader = get_zip_reader(stream, root=os.getcwdu())
opf = reader.opf
for author in opf.authors_path(opf.metadata):
author.getparent().remove(author)
and so on (see the authors()->fset function in opf2.py)
and then do
newopf = StringIO(opf.render())
do the replacing as in set_metadata()