> For the complete documentation index, see [llms.txt](https://dailyjournal.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dailyjournal.gitbook.io/notes/languages/python/resources/flask.md).

# Flask

Web Framework

{% embed url="<https://flask.palletsprojects.com/en/latest/>" %}

The entry point for Flask applications is a file named `app.py`.

{% code title="app.py" %}

```python
@app.route('/', methods=['GET'])
def index():
    return render_template('index.html')
```

{% endcode %}

By using `@app.route`, we indicate the route we want to create. The path will be `/`, which is the default route. We indicate this will be used for `GET`.
