{"id":16174871,"url":"https://github.com/app-generator/tutorial-flask-app","last_synced_at":"2026-04-29T08:32:39.490Z","repository":{"id":100503264,"uuid":"327970108","full_name":"app-generator/tutorial-flask-app","owner":"app-generator","description":"Flask App Tutorial - Learn to code | AppSeed","archived":false,"fork":false,"pushed_at":"2021-01-09T08:00:41.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T18:52:09.750Z","etag":null,"topics":["flask","flask-tutorial","learn-to-code"],"latest_commit_sha":null,"homepage":"https://github.com/app-generator/tutorial-flask","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/app-generator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-08T17:31:17.000Z","updated_at":"2022-03-18T09:23:35.000Z","dependencies_parsed_at":"2023-05-15T11:15:26.786Z","dependency_job_id":null,"html_url":"https://github.com/app-generator/tutorial-flask-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/app-generator/tutorial-flask-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Ftutorial-flask-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Ftutorial-flask-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Ftutorial-flask-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Ftutorial-flask-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/app-generator","download_url":"https://codeload.github.com/app-generator/tutorial-flask-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/app-generator%2Ftutorial-flask-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32417540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","flask-tutorial","learn-to-code"],"created_at":"2024-10-10T04:43:39.663Z","updated_at":"2026-04-29T08:32:39.485Z","avatar_url":"https://github.com/app-generator.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask App Tutorial\n\n\u003e Content provided by experienced developers based on the suggestions/questions from the audience. This initiative aims to provide **Free/Allways up-to-date** programming tutorials - Read the [Manifest](https://github.com/app-generator/learn-to-code).\n\n\u003cbr /\u003e\n\n## Topics\n\n- [Flask Introduction](#flask-introduction)\n- [Set up](#set-up) (aka environment)\n- [Edit the code](#edit-the-code)\n- [Start the application](#start-the-application)\n- [Summary](#summary)\n\n\u003cbr /\u003e\n\n\u003e Questions/Spot a problem? please open a new [issue](https://github.com/app-generator/tutorial-flask-app/issues/new).\n\n\u003cbr /\u003e\n\n## Flask Introduction\n\n:point_right: Flask is a lightweight web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. Compared to Django, Flask provides a lightweight codebase and more freedom to the developer.\n\nFlask is written in [Python](https://www.python.org/) and it does not require particular tools or libraries.\n\n\u003e Useful Flask Resources\n\n- [Flask](https://palletsprojects.com/p/flask/) - the official website\n- [Flask Docs](https://flask.palletsprojects.com/en/1.1.x/) - learn what Flask has to offer in detail \n- [Flask Tutorial](https://github.com/app-generator/tutorial-flask) - content provided by experienced developers\n\n\n\u003cbr /\u003e\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#topics\"\u003e :point_up_2: Return to top\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## Set up\n\n:point_right: To code a Flask application we need some tools properly set up in our workstation. Here is the recommended list: \n\n- [Python v3](https://www.python.org/downloads/) - the language used by Flask\n- A (free) editor: [VsCode](https://code.visualstudio.com/), [Sublime](https://www.sublimetext.com/), [Atom](https://atom.io/), [Notepad++](https://notepad-plus-plus.org/)\n\n\u003cbr /\u003e\n\nTo finish this tutorial we will work with the console (aka terminal). In Windows, we can use `Powershell` or the corespondent `xterm` for Linux. The next step is to open a terminal and check the Python installation:\n\n```bash\n$ python --version\nPython 3.8.4\n```\n\nIf the above command returns an error please double check the Python installation and get back here after to follow up the next steps.\n\n\u003cbr /\u003e\n\n**Install Flask**\n\nFlask is basicaly a Python package and we can install it with ease via a tool shipped by Python: [PIP](https://pypi.org/project/pip/).\n\n```bash\n$ pip install Flask\n```\n\n\u003cbr /\u003e\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#topics\"\u003e :point_up_2: Return to top\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## Edit the code\n\n:point_right: Create a new file named **hello.py** in the current directory and add this code:\n\n```python\nfrom flask import Flask\n\napp = Flask(__name__)\n\n@app.route('/')\ndef hello():\n    return f'My first Flask APP!'\n```\n\nThis simple code snippet ( also saved [here](./hello.py) ) does the following:\n\n- Import `Flask`, the library that we've installed in the previous step\n- `app` object is constructed by `Flask`. At this point, we can use all features provided by **Flask**\n- define a defaut `route` that will return a simple *Hello* message when someone access our application using the browser\n\n\u003cbr /\u003e\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#topics\"\u003e :point_up_2: Return to top\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## Start the application\n\n:point_right: Flask being such a nice framework, comes with a simple server to help us check the code without being forced to install 3rd party tools. To use it and see our minimal app running in the browser, a variable must be exported in the `environment` that informs `Flask` the name of the file:\n\n```bash\n$ # Set the FLASK_APP environment variable\n$ # Unix/Mac \n$ export FLASK_APP=hello.py\n$\n$ # Windows OS \n$ set FLASK_APP=hello.py\n$ \n$ # Windows OS - Powershell\n$ $env:FLASK_APP = \".\\hello.py\"\n```\n\nOnce we have this variable we can call `Flask`:\n\n```bash\n$ flask run\n```\n\nBy default `Flask` will start the application on address 'localhost:5000'. If we visit the aplication in the browser, we should see the message:\n\n**My first Flask APP!**\n\n\u003cbr /\u003e\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#topics\"\u003e :point_up_2: Return to top\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## Summary\n\n:point_right: During this tutorial we've learned a few basic things:\n\n- What is Flask and how to install it\n- We've code a super simple app\n- We've seen the application running in the browser\n\n\u003cbr /\u003e\n\n**Where to go from here?**\n\n- Access the [Flask Tutorial](https://github.com/app-generator/tutorial-flask) and learn more about Flask\n- [Learn to code](https://github.com/app-generator/learn-to-code) using other technologies. \n\n\u003cbr /\u003e\n\n\u003cp align=\"right\"\u003e\u003ca href=\"#topics\"\u003e :point_up_2: Return to top\u003c/a\u003e\u003c/p\u003e\n\n\u003cbr /\u003e\n\n---\n**Flask App Tutorial** - Free/Allways up-to-date Flask-related content | by [AppSeed](https://appseed.us?ref=gh).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Ftutorial-flask-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapp-generator%2Ftutorial-flask-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapp-generator%2Ftutorial-flask-app/lists"}