Apache2 module that embeds Python within the server.
Mod_python is an Apache 2 module that embeds the Python interpreter within the server. With mod_python you can write web-based applications in Python that will run many times faster than traditional CGI and will have access to advanced features such as ability to retain database connections and other data between hits and access to Apache internals.
To install mod_python27, paste this in macOS terminal after installing MacPorts
sudo port install mod_python27