Pacu was designed to allow external contribution to itself and the modules included with it. That's why it was built the way it was and released under the BSD-3 open source license. It is written in Python3 so all of its modules are written in Python3 as well.
Pacu comes with a template that is stored in the ./modules/template.py file, which makes it easy to get started on your own modules. It includes everything that is required to make your module work, along with some examples of how you might use different APIs exposed by the Pacu core program to make building your module easier.