import datetime as dt
from workadays import workdays as wd
# Diferença de dias úteis entre duas datas
d1 = dt.date(2021, 11, 1)
d2 = dt.date(2021, 11, 26)
print(wd.networkdays(d1, d2))
a Resposta do calculo será 17 tirando os finais de semana e Feriados.
O cogigo abaixo Exibe a lista de feriados do Brasil e de São Paulo
import datetime as dt
from workadays import workdays as wd
for date in wd.get_holidays(country='BR', state='SP', years=range(2020, 2022)):
print(date)
2020-01-01 2020-01-25 2020-02-24 2020-02-25 2020-04-10 2020-04-12 2020-04-21 2020-05-01 2020-06-11 2020-07-09 2020-09-07 2020-10-12 2020-11-02 2020-11-15 2020-11-20 2020-12-25 2021-01-01 2021-01-25 2021-02-15 2021-02-16 2021-04-02 2021-04-04 2021-04-21 2021-05-01 2021-06-03 2021-07-09 2021-09-07 2021-10-12 2021-11-02 2021-11-15 2021-11-20 2021-12-25