# flask-tutorial https://flask.palletsprojects.com/en/3.0.x/tutorial ## Installation ```bash python -m venv .venv source .venv/bin/activate pip install -r requirements.txt flask --app flaskr run --debug ``` ## Learning resources * https://flask.palletsprojects.com/en/3.0.x/#user-s-guide * https://sqlite.org/lang.html Concepts: * flask.g: Store data. Unique for each request * flask.current_app: Link to Flask app * flask.open_resource: From app package path * request: HTML request??? * Factory function > registered functions and blueprints. * Blueprint: groups views & other code * View: function that returns HTML * flask.session: dict that stores data across requests (cookies) (securely signed with SECRET_KEY) * *endpoint*: name associated with a view, `.` Gotchas: * Remember to call db.commit() after modifying DB (DML).