PostgreSQL: SET-ing from psql arguments
You can use the environment variable PGOPTIONS.  Either set it permanently or just when you call psql, e.g.,

PGOPTIONS='--statement-timeout=1min' psql ...


This works for any libpq client, including psycopg.

Of course you could also just put the SET statement in the  psqlscript.