A small web program can write the code in a file. Flask does not enforce a directory structure like Django, but when the program reaches a certain scale, a reasonable directory structure organization makes development and maintenance more convenient. The following is a Flask's directory structure:
|-flasky |-app/ |-templates/ |-static/ |-main/ |-__init__.py |-errors.py |-forms.py |-views.py |-__init__.py |-email.py |-models.py |-migrations/ |-tests/ |-__init__.py |-test*.py |-venv/ |-requirements.txt |-config.py |-flasky.py