It looks perhaps unmaintained these days, but in the past I solved a similar problem using Lamson.<p>Lamson: <a href="https:&#x2F;&#x2F;github.com&#x2F;zedshaw&#x2F;lamson" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;zedshaw&#x2F;lamson</a><p>Previous HN discussion: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=612642" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=612642</a>