My code on PostgreSQL:
select extract(dow from date \'2021-01-25\') ----------------------------------------- date_part 1
My code on Python:<