PyMOTW: tempfile

Securely generate temporary files and directories with the tempfile module.

Read more at pymotw.com: tempfile