How should the structure be for Apache Airflow?

I am new to Apache Airflow and I need to know how I should structure it. For example, in my personal project I have a python method that calls a Spotify API to get recently played tracks and other functions that load the data to a PostgreSQL database. I would like to schedule the runs.

Should I have these functions in a python script inside the dags folder or is it best if I have these functions in a completely separate project directory and import them to the DAG script? What would be the best practise?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum