Using the Extension Wizard module will allow you to create a skeleton where you could integrate the logic you implemented.
Since your module is completely written in python, you can create the skeleton using the Slicer downloaded from https://download.slicer.org without having to “build” the program.
Looking at the following resources will also be helpful: