Run Python Functions In JavaScript Code - 4 Easy Methods - CodeOp
Python excels in server-side applications, while JS dominates client-side web development. So, both are vital for development.
Flask
To handle AJAX requests, a server capable of processing these requests is required. We’ll use <anchor>Flask</anchor> – it’s a Python micro-framework suitable for small to medium-sized web applications.
Flask · PyPI
Flask · PyPI[Skip to main content](#content)
Switch to mobile version

[![PyPI](/static/images/logo-small.8998e9d1.svg)](/)

Search PyPISearch

- [Help](/help/)
- [Sponsors](/sponsors/)
- [Log in](/account/login/)
- [Register](/account/register/)

Menu

- [Help](/help/)
- [Sponsors](/sponsors/)
- [Log in](/account/login/)
- [Register](/account/register/)

Search PyPISearch

# Flask 3.0.3

pip install FlaskCopy PIP instructions

[Latest version](/project/Flask/)

Released:
Apr 7, 2024

A simple framework for building complex web applications.

### Navigation

- [Project description](#description)
- [Release history](#history)
- [Download files](#files)

### Verified details   [_(What is this?)_](https://docs.pypi.org/project_metadata/\#verified-details)

_These details have been verified by PyPI_

###### Owner

[![organization icon](/static/images/blue-sitemap.028cde9a.webp)\
Pallets Projects](/org/pallets/)

### Unverified details

_These details have **not** been verified by PyPI_

###### Project links

- [Changes](https://flask.palletsprojects.com/changes/)
- [Chat](https://discord.gg/pallets)
- [Documentation](https://flask.palletsprojects.com/)
- [Donate](https://palletsprojects.com/donate)
- [Source](https://github.com/pallets/flask/)

###### Meta

- **License:** BSD License

- **Maintainer:** [Pallets](mailto:contact@palletsprojects.com)
- **Requires:** Python >=3.8


###### Classifiers

- **Development Status**  - [5 - Production/Stable](/search/?c=Development+Status+%3A%3A+5+-+Production%2FStable)
- **Environment**  - [Web Environment](/search/?c=Environment+%3A%3A+Web+Environment)
- **Framework**  - [Flask](/search/?c=Framework+%3A%3A+Flask)
- **Intended Audience**  - [Developers](/search/?c=Intended+Audience+%3A%3A+Developers)
- **License**  - [OSI Approved :: BSD License](/search/?c=License+%3A%3A+OSI+Approved+%3A%3A+BSD+License)
- **Operating System**  - [OS Independent](/search/?c=Operating+System+%3A%3A+OS+Independent)
- **Programming Language**  - [Python](/search/?c=Programming+Language+%3A%3A+Python)
- **Topic**  - [Internet :: WWW/HTTP :: Dynamic Content](/search/?c=Topic+%3A%3A+Internet+%3A%3A+WWW%2FHTTP+%3A%3A+Dynamic+Content)
  - [Internet :: WWW/HTTP :: WSGI](/search/?c=Topic+%3A%3A+Internet+%3A%3A+WWW%2FHTTP+%3A%3A+WSGI)
  - [Internet :: WWW/HTTP :: WSGI :: Application](/search/?c=Topic+%3A%3A+Internet+%3A%3A+WWW%2FHTTP+%3A%3A+WSGI+%3A%3A+Application)
  - [Software Development :: Libraries :: Application Frameworks](/search/?c=Topic+%3A%3A+Software+Development+%3A%3A+Libraries+%3A%3A+Application+Frameworks)
- **Typing**  - [Typed](/search/?c=Typing+%3A%3A+Typed)

- [Project description](#description)
- [Project details](#data)
- [Release history](#history)
- [Download files](#files)

## Project description

# Flask

Flask is a lightweight [WSGI](https://wsgi.readthedocs.io/) web application framework. It is designed
to make getting started quick and easy, with the ability to scale up to
complex applications. It began as a simple wrapper around [Werkzeug](https://werkzeug.palletsprojects.com/)
and [Jinja](https://jinja.palletsprojects.com/), and has become one of the most popular Python web
application frameworks.

Flask offers suggestions, but doesn't enforce any dependencies or
project layout. It is up to the developer to choose the tools and
libraries they want to use. There are many extensions provided by the
community that make adding new functionality easy.

## Installing

Install and update from [PyPI](https://pypi.org/project/Flask/) using an installer such as [pip](https://pip.pypa.io/en/stable/getting-started/):

```
$ pip install -U Flask

```

## A Simple Example

```
# save this as app.py
from flask import Flask

app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello, World!"

```

```
$ flask run
  * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

```

## Contributing

For guidance on setting up a development environment and how to make a
contribution to Flask, see the [contributing guidelines](https://github.com/pallets/flask/blob/main/CONTRIBUTING.rst).

## Donate

The Pallets organization develops and supports Flask and the libraries
it uses. In order to grow the community of contributors and users, and
allow the maintainers to devote more time to the projects, [please\
donate today](https://palletsprojects.com/donate).

## Project details

### Verified details   [_(What is this?)_](https://docs.pypi.org/project_metadata/\#verified-details)

_These details have been verified by PyPI_

###### Owner

[![organization icon](/static/images/blue-sitemap.028cde9a.webp)\
Pallets Projects](/org/pallets/)

### Unverified details

_These details have **not** been verified by PyPI_

###### Project links

- [Changes](https://flask.palletsprojects.com/changes/)
- [Chat](https://discord.gg/pallets)
- [Documentation](https://flask.palletsprojects.com/)
- [Donate](https://palletsprojects.com/donate)
- [Source](https://github.com/pallets/flask/)

###### Meta

- **License:** BSD License

- **Maintainer:** [Pallets](mailto:contact@palletsprojects.com)
- **Requires:** Python >=3.8


###### Classifiers

- **Development Status**  - [5 - Production/Stable](/search/?c=Development+Status+%3A%3A+5+-+Production%2FStable)
- **Environment**  - [Web Environment](/search/?c=Environment+%3A%3A+Web+Environment)
- **Framework**  - [Flask](/search/?c=Framework+%3A%3A+Flask)
- **Intended Audience**  - [Developers](/search/?c=Intended+Audience+%3A%3A+Developers)
- **License**  - [OSI Approved :: BSD License](/search/?c=License+%3A%3A+OSI+Approved+%3A%3A+BSD+License)
- **Operating System**  - [OS Independent](/search/?c=Operating+System+%3A%3A+OS+Independent)
- **Programming Language**  - [Python](/search/?c=Programming+Language+%3A%3A+Python)
- **Topic**  - [Internet :: WWW/HTTP :: Dynamic Content](/search/?c=Topic+%3A%3A+Internet+%3A%3A+WWW%2FHTTP+%3A%3A+Dynamic+Content)
  - [Internet :: WWW/HTTP :: WSGI](/search/?c=Topic+%3A%3A+Internet+%3A%3A+WWW%2FHTTP+%3A%3A+WSGI)
  - [Internet :: WWW/HTTP :: WSGI :: Application](/search/?c=Topic+%3A%3A+Internet+%3A%3A+WWW%2FHTTP+%3A%3A+WSGI+%3A%3A+Application)
  - [Software Development :: Libraries :: Application Frameworks](/search/?c=Topic+%3A%3A+Software+Development+%3A%3A+Libraries+%3A%3A+Application+Frameworks)
- **Typing**  - [Typed](/search/?c=Typing+%3A%3A+Typed)

## Release history[Release notifications](/help/\#project-release-notifications) \|  [RSS feed](/rss/project/flask/releases.xml)

This version

![](https://pypi.org/static/images/blue-cube.572a5bfb.svg)

[3.0.3\
\
\
Apr 7, 2024](/project/Flask/3.0.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[3.0.2\
\
\
Feb 3, 2024](/project/Flask/3.0.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[3.0.1\
\
\
Jan 18, 2024](/project/Flask/3.0.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[3.0.0\
\
\
Sep 30, 2023](/project/Flask/3.0.0/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.3.3\
\
\
Aug 21, 2023](/project/Flask/2.3.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.3.2\
\
\
May 1, 2023](/project/Flask/2.3.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.3.1\
\
\
Apr 25, 2023](/project/Flask/2.3.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.3.0\
\
\
Apr 25, 2023](/project/Flask/2.3.0/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.2.5\
\
\
May 2, 2023](/project/Flask/2.2.5/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.2.4\
\
\
Apr 25, 2023](/project/Flask/2.2.4/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.2.3\
\
\
Feb 15, 2023](/project/Flask/2.2.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.2.2\
\
\
Aug 8, 2022](/project/Flask/2.2.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.2.1\
\
\
Aug 3, 2022](/project/Flask/2.2.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.2.0\
\
\
Aug 2, 2022](/project/Flask/2.2.0/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.1.3\
\
\
Jul 13, 2022](/project/Flask/2.1.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.1.2\
\
\
Apr 28, 2022](/project/Flask/2.1.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.1.1\
\
\
Mar 30, 2022](/project/Flask/2.1.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.1.0\
\
\
Mar 28, 2022](/project/Flask/2.1.0/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.0.3\
\
\
Feb 14, 2022](/project/Flask/2.0.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.0.2\
\
\
Oct 4, 2021](/project/Flask/2.0.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.0.1\
\
\
May 21, 2021](/project/Flask/2.0.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.0.0\
\
\
May 11, 2021](/project/Flask/2.0.0/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.0.0rc2\
\
pre-release \
\
May 3, 2021](/project/Flask/2.0.0rc2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[2.0.0rc1\
\
pre-release \
\
Apr 16, 2021](/project/Flask/2.0.0rc1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.1.4\
\
\
May 14, 2021](/project/Flask/1.1.4/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.1.3\
\
\
May 13, 2021](/project/Flask/1.1.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.1.2\
\
\
Apr 3, 2020](/project/Flask/1.1.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.1.1\
\
\
Jul 8, 2019](/project/Flask/1.1.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.1.0\
\
\
Jul 4, 2019](/project/Flask/1.1.0/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.0.4\
\
\
Jul 4, 2019](/project/Flask/1.0.4/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.0.3\
\
\
May 17, 2019](/project/Flask/1.0.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.0.2\
\
\
May 2, 2018](/project/Flask/1.0.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.0.1\
\
\
Apr 30, 2018](/project/Flask/1.0.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[1.0\
\
\
Apr 26, 2018](/project/Flask/1.0/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.12.5\
\
\
Feb 10, 2020](/project/Flask/0.12.5/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.12.4\
\
\
Apr 30, 2018](/project/Flask/0.12.4/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.12.3\
\
\
Apr 26, 2018](/project/Flask/0.12.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.12.2\
\
\
May 16, 2017](/project/Flask/0.12.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.12.1\
\
\
Mar 31, 2017](/project/Flask/0.12.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.12\
\
\
Dec 21, 2016](/project/Flask/0.12/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.11.1\
\
\
Jun 7, 2016](/project/Flask/0.11.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.11\
\
\
May 29, 2016](/project/Flask/0.11/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.10.1\
\
\
Jun 14, 2013](/project/Flask/0.10.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.10\
\
\
Jun 13, 2013](/project/Flask/0.10/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.9\
\
\
Jul 1, 2012](/project/Flask/0.9/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.8.1\
\
\
Jul 1, 2012](/project/Flask/0.8.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.8\
\
\
Sep 29, 2011](/project/Flask/0.8/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.7.2\
\
\
Jul 6, 2011](/project/Flask/0.7.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.7.1\
\
\
Jun 29, 2011](/project/Flask/0.7.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.7\
\
\
Jun 28, 2011](/project/Flask/0.7/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.6.1\
\
\
Dec 31, 2010](/project/Flask/0.6.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.6\
\
\
Jul 27, 2010](/project/Flask/0.6/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.5.2\
\
\
Jul 15, 2010](/project/Flask/0.5.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.5.1\
\
\
Jul 6, 2010](/project/Flask/0.5.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.5\
\
\
Jul 6, 2010](/project/Flask/0.5/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.4\
\
\
Jun 18, 2010](/project/Flask/0.4/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.3.1\
\
\
May 28, 2010](/project/Flask/0.3.1/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.3\
\
\
May 27, 2010](/project/Flask/0.3/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.2\
\
\
May 11, 2010](/project/Flask/0.2/)

![](https://pypi.org/static/images/white-cube.2351a86c.svg)

[0.1\
\
\
Apr 16, 2010](/project/Flask/0.1/)

## Download files

Download the file for your platform. If you're not sure which to choose, learn more about [installing packages](https://packaging.python.org/tutorials/installing-packages/ "External link").

### Source Distribution

[flask-3.0.3.tar.gz](https://files.pythonhosted.org/packages/41/e1/d104c83026f8d35dfd2c261df7d64738341067526406b40190bc063e829a/flask-3.0.3.tar.gz)
(676.3 kB
[view hashes](#copy-hash-modal-dba2e308-a3c9-4915-8b50-eb84e0d577cc))


Uploaded
Apr 7, 2024
`Source`

### Built Distribution

[flask-3.0.3-py3-none-any.whl](https://files.pythonhosted.org/packages/61/80/ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06/flask-3.0.3-py3-none-any.whl)
(101.7 kB
[view hashes](#copy-hash-modal-ce1cf020-ee79-41e0-ae0f-f74d1386ab60))


Uploaded
Apr 7, 2024
`Python 3`

[Close](#modal-close "Close")

### [Hashes](https://pip.pypa.io/en/stable/topics/secure-installs/\#hash-checking-mode "External link") for flask-3.0.3.tar.gz

Hashes for flask-3.0.3.tar.gzAlgorithmHash digestSHA256`ceb27b0af3823ea2737928a4d99d125a06175b8512c445cbd9a9ce200ef76842`
Copy MD5`4658b022a07f6d8df51ef24c717fe162`
Copy BLAKE2b-256`41e1d104c83026f8d35dfd2c261df7d64738341067526406b40190bc063e829a`
Copy

[Close](#modal-close)

[Close](#modal-close "Close")

### [Hashes](https://pip.pypa.io/en/stable/topics/secure-installs/\#hash-checking-mode "External link") for flask-3.0.3-py3-none-any.whl

Hashes for flask-3.0.3-py3-none-any.whlAlgorithmHash digestSHA256`34e815dfaa43340d1d15a5c3a02b8476004037eb4840b34910c6e21679d288f3`
Copy MD5`fe39440012a05441fa61d70e92d81754`
Copy BLAKE2b-256`6180ffe1da13ad9300f87c93af113edd0638c75138c42a0994becfacac078c06`
Copy

[Close](#modal-close)

![](/static/images/white-cube.2351a86c.svg)

## Help

- [Installing packages](https://packaging.python.org/tutorials/installing-packages/ "External link")
- [Uploading packages](https://packaging.python.org/tutorials/packaging-projects/ "External link")
- [User guide](https://packaging.python.org/ "External link")
- [Project name retention](https://www.python.org/dev/peps/pep-0541/ "External link")
- [FAQs](/help/)

## About PyPI

- [PyPI Blog](https://blog.pypi.org "External link")
- [Infrastructure dashboard](https://dtdg.co/pypi "External link")
- [Statistics](/stats/)
- [Logos & trademarks](/trademarks/)
- [Our sponsors](/sponsors/)

## Contributing to PyPI

- [Bugs and feedback](/help/#feedback)
- [Contribute on GitHub](https://github.com/pypi/warehouse "External link")
- [Translate PyPI](https://hosted.weblate.org/projects/pypa/warehouse/ "External link")
- [Sponsor PyPI](/sponsors/)
- [Development credits](https://github.com/pypi/warehouse/graphs/contributors "External link")

## Using PyPI

- [Code of conduct](https://policies.python.org/python.org/code-of-conduct/ "External link")
- [Report security issue](/security/)
- [Privacy policy](https://www.python.org/privacy/ "External link")
- [Terms of Use](https://policies.python.org/pypi.org/Terms-of-Use/ "External link")
- [Acceptable Use Policy](https://policies.python.org/pypi.org/Acceptable-Use-Policy/ "External link")

* * *

Status: [all systems operational](https://status.python.org/ "External link")

Developed and maintained by the Python community, for the Python community.

[Donate today!](https://donate.pypi.org)

"PyPI", "Python Package Index", and the blocks logos are registered [trademarks](/trademarks/) of the [Python Software Foundation](https://www.python.org/psf-landing).

© 2024 [Python Software Foundation](https://www.python.org/psf-landing/ "External link")

[Site map](/sitemap/)

Switch to desktop version

- English

- español

- français

- 日本語

- português (Brasil)

- українська

- Ελληνικά

- Deutsch

- 中文 (简体)

- 中文 (繁體)

- русский

- עברית

- Esperanto


Supported by

[![AWS](https://pypi-camo.freetls.fastly.net/ed7074cadad1a06f56bc520ad9bd3e00d0704c5b/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f707970692d6173736574732f73706f6e736f726c6f676f732f6177732d77686974652d6c6f676f2d7443615473387a432e706e67)AWS\
Cloud computing and Security Sponsor](https://aws.amazon.com/) [![Datadog](https://pypi-camo.freetls.fastly.net/8855f7c063a3bdb5b0ce8d91bfc50cf851cc5c51/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f707970692d6173736574732f73706f6e736f726c6f676f732f64617461646f672d77686974652d6c6f676f2d6668644c4e666c6f2e706e67)Datadog\
Monitoring](https://www.datadoghq.com/) [![Fastly](https://pypi-camo.freetls.fastly.net/df6fe8829cbff2d7f668d98571df1fd011f36192/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f707970692d6173736574732f73706f6e736f726c6f676f732f666173746c792d77686974652d6c6f676f2d65684d3077735f6f2e706e67)Fastly\
CDN](https://www.fastly.com/) [![Google](https://pypi-camo.freetls.fastly.net/420cc8cf360bac879e24c923b2f50ba7d1314fb0/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f707970692d6173736574732f73706f6e736f726c6f676f732f676f6f676c652d77686974652d6c6f676f2d616734424e3774332e706e67)Google\
Download Analytics](https://careers.google.com/) [![Microsoft](https://pypi-camo.freetls.fastly.net/524d1ce72f7772294ca4c1fe05d21dec8fa3f8ea/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f707970692d6173736574732f73706f6e736f726c6f676f732f6d6963726f736f66742d77686974652d6c6f676f2d5a443172685444462e706e67)Microsoft\
PSF Sponsor](https://www.python.org/psf/sponsors/#microsoft) [![Pingdom](https://pypi-camo.freetls.fastly.net/d01053c02f3a626b73ffcb06b96367fdbbf9e230/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f707970692d6173736574732f73706f6e736f726c6f676f732f70696e67646f6d2d77686974652d6c6f676f2d67355831547546362e706e67)Pingdom\
Monitoring](https://www.pingdom.com/) [![Sentry](https://pypi-camo.freetls.fastly.net/67af7117035e2345bacb5a82e9aa8b5b3e70701d/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f707970692d6173736574732f73706f6e736f726c6f676f732f73656e7472792d77686974652d6c6f676f2d4a2d6b64742d706e2e706e67)Sentry\
Error logging](https://getsentry.com/for/python) [![StatusPage](https://pypi-camo.freetls.fastly.net/b611884ff90435a0575dbab7d9b0d3e60f136466/68747470733a2f2f73746f726167652e676f6f676c65617069732e636f6d2f707970692d6173736574732f73706f6e736f726c6f676f732f737461747573706167652d77686974652d6c6f676f2d5467476c6a4a2d502e706e67)StatusPage\
Status page](https://statuspage.io)