Flask (pallets/flask)
A lightweight Python web framework for building websites and JSON APIs, with routing, request handling, and templates, and extensions for everything else.
Not checked by a trusted editor yet Last edited Outdated?
pallets/flask
- Stars
- 74.9k
- Forks
- 17.1k
- Language
- Python
- Licence
- BSD-3-Clause
- Last push
- 7 Oct 2026
On GitHub: The Python micro framework for building web applications.
Open on GitHubFlask is a Python web framework maintained by the Pallets community. A complete app can fit in a few lines: you create a Flask object, decorate functions with @app.route("/path"), and return a string, a template, or a dictionary that Flask turns into JSON. It builds on two other Pallets projects: Werkzeug for HTTP and request handling, and Jinja for HTML templates.
Flask calls itself a micro framework because it does not decide your database, form library, or authentication approach. Those come from extensions or from libraries you pick yourself. That makes it a popular choice for small services, prototypes, and learning how web apps work, while still scaling to large applications through blueprints and application factories.
For local development, flask --app app run --debug starts a reloading development server. That server is not meant for production; deploy behind a WSGI server such as Gunicorn or Waitress. The official tutorial in the repository’s documentation walks through a small blog app and is a solid first project.
Did this work for you?
No votes yet. Be the first.
If it did not work, the report form below tells the editors what went wrong.
See also
- 0001 Virtual environments with venv A virtual environment is a private folder of Python packages for one project, so projects never fight over versions. Create one with… Beginner · Explains an idea · Any system Article Environments & packages 15 Oct 2026
- 0002 Python cheat sheet: strings, lists, dicts and f-strings The everyday methods for text, lists and dictionaries, plus f-string formatting and comprehensions, each with a one-line example you can paste into… Beginner · Cheat sheet · Any system Article Basics 15 Oct 2026
- 0003 pathlib cheat sheet: files and folders in Python pathlib.Path is the modern way to build paths, read and write files, and list or search folders in Python. This page lists… Beginner · Cheat sheet · Any system Article Files & automation 15 Oct 2026
- 0004 Logging instead of print The logging module gives every message a level, a timestamp and a destination you can change without editing code. It is the… Intermediate · Explains an idea · Any system Article Files & automation 15 Oct 2026
- 0005 Dataclasses in depth @dataclass writes __init__, __repr__ and __eq__ for classes that mainly hold data. Learn defaults, default_factory, frozen and ordered classes, __post_init__ validation, slots… Advanced · Explains an idea · Any system Article Basics 15 Oct 2026
- 0006 Testing with pytest: first tests, fixtures and parametrize pytest runs plain functions whose names start with test_ and reports every failing assert in detail. This guide covers setup, assertions, exceptions,… Intermediate · Step by step · Any system Article Testing 15 Oct 2026
History
Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.
- Commitpedia +1,047 chars