#!/usr/bin/env python from libmproxy import script f = script.load_flow() f.request.headers["newheader"] = ["foo"] script.return_flow(f)