You can see an example input file (not Python script) of using cubeprophere. The important part for getting cubeprop to deliver spin density maps is line 13, where “density” is included in the cubeprop_tasks options.
Lines 1-20 of that file are what you need to get the cube files, everything after that is just testing that Psi’s cube files match some reference ones. Converting those lines to a Python input file is a good exercise if you’re just getting started with Psi4. See this page of the documentation for basic Psi4/Python syntax.
Feel free to ask if you get stuck while trying to convert the file.