def daterange(start_date, end_date):
for n in range(int ((end_date - start_date).days)):
yield start_date + timedelta(n)
# задаем промежуток времени
start_date = date(2019, 1, 1)
end_date = date(2019, 1, 31)
for single_date in daterange(start_date, end_date):
print(single_date.strftime("%Y-%m-%d"))