STATIC puts the code in a .a that gets statically linked when you build the executable.
SHARED puts the code in a .so that gets dynamically linked at run time, and generates a .a that gets statically linked and tells the execution environment how to link to the .so (what its name is, which symbols are used, etc.)
MODULE is the same as SHARED, except it doesn't generate the .a. The caller process is expected to call dynamic loading functions (e.g. dlopen()) to load the .so and then query the loaded module for specific symbols.
For your use case, MODULE is the most appropriate, since you can't link to a .a from a scripting language, but either should work just fine.