Help with Python Scripting

Version:
MacOS 10.13.3
Audacity 2.2.1

Hello, I’ve been scouring these forums and the web and while I’ve found it’s possible, and what’s supported, I can’t find or figure out how I can use Python to script Audacity. Put simply what I need to do is create a script that will open a new file (New:) and start recording (Record1stChoice:), and one that will stop recording (Stop:) and export the recording with a given filename (Export2:). Could someone help or provide example code of how to work with Audacity via Python?

Thank you.