Are you looking to actually connect to Redshift from within your Python code itself? If not, and you are simply trying to use existing Redshift tables in your plugin or recipe, then you can simply create a dataset in DSS pointing to the table(s) and use our existing dataset APIs, similar to the examples that can be found in our documentation here:
Otherwise, if you are looking to connect directly via Python, then it's important to keep in mind that "Python in DSS" is essentially the same as "Python outside of DSS". Therefore, this would be similar to asking how you can generically connect to Redshift through Python locally. From doing a quick Google search online, it appears that one common approach is to leverage the psycopg2 package in Python (which you would need to first install in a code environment). Then, you could write additional code to establish the connection itself and either pull the data in, submit queries, write data, etc.
If you do decide to go this route, you may find the following links helpful as well: