Light, pythonic implementation of Gary Bernhardt's "Functional Core, Imperative Shell" pattern.