README.rst 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Flask
  2. =====
  3. Flask is a lightweight `WSGI`_ web application framework. It is designed
  4. to make getting started quick and easy, with the ability to scale up to
  5. complex applications. It began as a simple wrapper around `Werkzeug`_
  6. and `Jinja`_ and has become one of the most popular Python web
  7. application frameworks.
  8. Flask offers suggestions, but doesn't enforce any dependencies or
  9. project layout. It is up to the developer to choose the tools and
  10. libraries they want to use. There are many extensions provided by the
  11. community that make adding new functionality easy.
  12. Installing
  13. ----------
  14. Install and update using `pip`_:
  15. .. code-block:: text
  16. pip install -U Flask
  17. A Simple Example
  18. ----------------
  19. .. code-block:: python
  20. from flask import Flask
  21. app = Flask(__name__)
  22. @app.route("/")
  23. def hello():
  24. return "Hello, World!"
  25. .. code-block:: text
  26. $ env FLASK_APP=hello.py flask run
  27. * Serving Flask app "hello"
  28. * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
  29. Contributing
  30. ------------
  31. For guidance on setting up a development environment and how to make a
  32. contribution to Flask, see the `contributing guidelines`_.
  33. .. _contributing guidelines: https://github.com/pallets/flask/blob/master/CONTRIBUTING.rst
  34. Donate
  35. ------
  36. The Pallets organization develops and supports Flask and the libraries
  37. it uses. In order to grow the community of contributors and users, and
  38. allow the maintainers to devote more time to the projects, `please
  39. donate today`_.
  40. .. _please donate today: https://psfmember.org/civicrm/contribute/transact?reset=1&id=20
  41. Links
  42. -----
  43. * Website: https://palletsprojects.com/p/flask/
  44. * Documentation: https://flask.palletsprojects.com/
  45. * Releases: https://pypi.org/project/Flask/
  46. * Code: https://github.com/pallets/flask
  47. * Issue tracker: https://github.com/pallets/flask/issues
  48. * Test status: https://dev.azure.com/pallets/flask/_build
  49. * Official chat: https://discord.gg/t6rrQZH
  50. .. _WSGI: https://wsgi.readthedocs.io
  51. .. _Werkzeug: https://www.palletsprojects.com/p/werkzeug/
  52. .. _Jinja: https://www.palletsprojects.com/p/jinja/
  53. .. _pip: https://pip.pypa.io/en/stable/quickstart/