using python to create pages into a module

Community Explorer

I am wanting to automate the process from content in a word doc and using an API to create the modules and then the pages within the modules based a standardised theme. I can get it to create the content and the pages fine, It labels them correctly and then applies the theme as I want it to. But then makes the pages BUT not in the modules.??? any help would be great