There is no direct way to use SPOOL within cx_Oracle.
The problem is that SPOOL is SQL*PLUS specific command. It is not an Oracle SQL command. Therefore the actual spooling is handled on client side. When you do things like
SPOOL ON
SET PAGESIZE 0
SET SERVEROUTPUT ON
COLUMN username FORMAT A20
all of there commands are SQL*PLUS commands, a local (client-side) commands and they are not being send to Oracle server nor changing the behaviour of Oracle session at all.
These commands are there only to manipulate the way how the output from Oracle server is going to be shown on screen (or written to file or printer in case of SPOOL).
You can identify a local command by the fact that it does not have to be ended with semicolon ; (in most cases).
Full reference of SQL*PLUS commands can be found here: https://docs.oracle.com/database/121/SQPUG/ch_twelve001.htm#SQPUG023