In this tutorial, you will be building a search engine to search for product attributes using a Flask app and Elasticsearch.
To participate in this tutorial, you need the following:
1) A computer with a good text editor (Vim, Sublime, Atom, etc.) installed on it.
2) Complete the Tutorial Prerequisites
Continuing from Part 1:
git commit -am "session1 work"
git fetch
git checkout session2
source venv/bin/activate
python searchapp/index_products.py
Bumps werkzeug from 0.15.3 to 0.15.5.
Sourced from werkzeug's changelog.
Version 0.15.5
Released 2019-07-17
- Fix a
TypeError
due to changes toast.Module
in Python 3.8. :issue:1551
- Fix a C assertion failure in debug builds of some Python 2.7 releases. :issue:
1553
- :class:
~exceptions.BadRequestKeyError
adds theKeyError
message to the description ife.show_exception
is set toTrue
. This is a more secure default than the original 0.15.0 behavior and makes it easier to control without losing information. :pr:1592
- Upgrade the debugger to jQuery 3.4.1. :issue:
1581
- Work around an issue in some external debuggers that caused the reloader to fail. :issue:
1607
- Work around an issue where the reloader couldn't introspect a setuptools script installed as an egg. :issue:
1600
- The reloader will use
sys.executable
even if the script is marked executable, reverting a behavior intended for NixOS introduced in 0.15. The reloader should no longer causeOSError: [Errno 8] Exec format error
. :issue:1482
, :issue:1580
SharedDataMiddleware
safely handles paths with Windows drive names. :issue:1589
Version 0.15.4
Released 2019-05-14
- Fix a
SyntaxError
on Python 2.7.5. (:issue:1544
)
8cfab30
release version 0.15.5d1f5fab
update project links726b25b
Merge pull request #1613 from pallets/revert-nixos-reloader-check1f532b8
don't detect executable file for reloadera8d26bf
Merge pull request #1612 from pallets/shared-dataacc999e
SharedDataMiddleware uses safe_join8afe4eb
Merge pull request #1582 from Cerebus/fix/1581-jquery-3.4.1e0de4a4
Merge pull request #1601 from pokoli/reloader_packageec68771
update to jQuery 3.4.17a01660
explain reloader workaround for egg scriptDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps flask from 0.12.3 to 1.0.
Sourced from flask's releases.
1.0
The Pallets team is pleased to release Flask 1.0. [Read the announcement on our blog.](https://www.palletsprojects.com/blog/flask-1-0-released/
There are over a year's worth of changes in this release. Many features have been improved or changed. Read the changelog to understand how your project's code will be affected.
JSON Security Fix
Flask previously decoded incoming JSON bytes using the content type of the request. Although JSON should only be encoded as UTF-8, Flask was more lenient. However, Python includes non-text related encodings that could result in unexpected memory use by a request.
Flask will now detect the encoding of incoming JSON data as one of the supported UTF encodings, and will not allow arbitrary encodings from the request.
Install or Upgrade
Install from PyPI with pip:
pip install -U Flask
0.12.4
This is a repackage of 0.12.3 to fix an issue with how the package was built.
Upgrade
Upgrade from PyPI with pip. Use a version identifier if you want to stay at 0.12:
pip install -U 'Flask~=0.12.4'
Sourced from flask's changelog.
Version 1.0
Released 2018-04-26
- Python 2.6 and 3.3 are no longer supported.
- Bump minimum dependency versions to the latest stable versions: Werkzeug >= 0.14, Jinja >= 2.10, itsdangerous >= 0.24, Click >= 5.1. :issue:
2586
- Skip :meth:
app.run <Flask.run>
when a Flask application is run from the command line. This avoids some behavior that was confusing to debug.- Change the default for :data:
JSONIFY_PRETTYPRINT_REGULAR
toFalse
. :func:~json.jsonify
returns a compact format by default, and an indented format in debug mode. :pr:2193
- :meth:
Flask.__init__ <Flask>
accepts thehost_matching
argument and sets it on :attr:~Flask.url_map
. :issue:1559
- :meth:
Flask.__init__ <Flask>
accepts thestatic_host
argument and passes it as thehost
argument when defining the static route. :issue:1559
- :func:
send_file
supports Unicode inattachment_filename
. :pr:2223
- Pass
_scheme
argument from :func:url_for
to :meth:~Flask.handle_url_build_error
. :pr:2017
- :meth:
~Flask.add_url_rule
accepts theprovide_automatic_options
argument to disable adding theOPTIONS
method. :pr:1489
- :class:
~views.MethodView
subclasses inherit method handlers from base classes. :pr:1936
- Errors caused while opening the session at the beginning of the request are handled by the app's error handlers. :pr:
2254
- Blueprints gained :attr:
~Blueprint.json_encoder
and :attr:~Blueprint.json_decoder
attributes to override the app's encoder and decoder. :pr:1898
- :meth:
Flask.make_response
raisesTypeError
instead ofValueError
for bad response types. The error messages have been improved to describe why the type is invalid. :pr:2256
- Add
routes
CLI command to output routes registered on the application. :pr:2259
- Show warning when session cookie domain is a bare hostname or an IP address, as these may not behave properly in some browsers, such as Chrome. :pr:
2282
- Allow IP address as exact session cookie domain. :pr:
2282
SESSION_COOKIE_DOMAIN
is set if it is detected throughSERVER_NAME
. :pr:2282
- Auto-detect zero-argument app factory called
create_app
ormake_app
fromFLASK_APP
. :pr:2297
- Factory functions are not required to take a
script_info
parameter to work with theflask
command. If they take a single parameter or a parameter namedscript_info
, the
... (truncated)
291f3c3
Bump version number to 1.036e68a4
release 1.0216151c
Merge branch '0.12-maintenance'23047a7
Bump version number to 0.12.4.dev062745b
Merge pull request #2720 from pallets/setup-link5c8110d
ensure order of project urls10a77a5
Add project_urls so that PyPI will show GitHub stats.2ede0b8
add donate link4137aec
add donate link4df5f82
Merge pull request #2719 from greyli/patch-9Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.