Creating Functional Blocks with Python for File Generation