Create and modify nginx serverblock configs in Python