Executing python script on Apache in MacOS Sierra
Got it to work. Here are the steps that I followed:

In etc/apache2/httpd.conf I uncommented:
LoadModule cgi_module libexec/apache2/mod_cgi.so
Restarted Apache sudo apachectl restart
List itemAdded a .htaccess file to my directory with the following contents:
Options ExecCGI
 AddHandler cgi-script .py
 Order allow,deny
 Allow from all
Added #!/usr/bin/env python to the top of my python script
In terminal enabled execution of the python script using: chmod +x widget.py
I am trying to create a python script (widget.py) that will get a JSON feed from an arbitrary resource. I can't get the python script to execute on localhost. Here are the steps I have followed:

In etc/apache2/httpd.conf I enabled LoadModule cgi_module libexec/apache2/mod_cgi.so
Restarted Apache sudo apachectl restart
Added a .htaccess file to my directory:
<Directory "widget.py">
  Options +ExecCGI
  AddHandler cgi-script .py
</Directory>
NOTE: I will eventually need to deploy this on a server where I won't have access to the apache2 directory.
Navigated to http://localhost/~walter/widget/widget.py

I get a 500 server error. Log file contents:
[Sat Jul 01 08:51:00.922413 2017] [core:info] [pid 75403] AH00096: removed PID file /private/var/run/httpd.pid (pid=75403)
[Sat Jul 01 08:51:00.922446 2017] [mpm_prefork:notice] [pid 75403] AH00169: caught SIGTERM, shutting down
AH00112: Warning: DocumentRoot [/usr/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/usr/docs/dummy-host2.example.com] does not exist
[Sat Jul 01 08:51:01.449227 2017] [mpm_prefork:notice] [pid 75688] AH00163: Apache/2.4.25 (Unix) PHP/5.6.30 configured -- resuming normal operations
[Sat Jul 01 08:51:01.449309 2017] [core:notice] [pid 75688] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
Do I need to enable cgi in /etc/apache2/users/walter/http.conf? Should I?