Skip to main content

flake8 plugin with checks for the Flask framework, by r2c

Project description

flake8-flask

flake8-flask is a plugin for flake8 with checks specifically for the flask framework, written by r2c

Installation

pip install flake8-flask

Validate the install using --version.

> flake8 --version
3.7.9 (flake8-flask: 0.2.1, mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1)

List of warnings

r2c-flask-send-file-open: This check detects the use of a file-like object in flask.send_file without either mimetype or attachment_filename keyword arguments. send_file will throw a ValueError in this situation.

r2c-flask-secure-set-cookie: This check detects calls to response.set_cookie that do not have secure, httponly, and samesite set. This follows the guidance in the Flask documentation.

r2c-flask-unescaped-file-extension: Flask will not autoescape Jinja templates that do not have .html, .htm, .xml, or .xhtml as extensions. This check will alert you if you do not have one of these extensions. This check will also do its best to detect if context variables are escaped if a non-escaped extension is used.

Have an idea for a check? Reach out to us at https://r2c.dev!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

flake8_flask-0.3.0b1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file flake8_flask-0.3.0b1.macosx-10.14-x86_64.tar.gz.

File metadata

  • Download URL: flake8_flask-0.3.0b1.macosx-10.14-x86_64.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.2

File hashes

Hashes for flake8_flask-0.3.0b1.macosx-10.14-x86_64.tar.gz
Algorithm Hash digest
SHA256 554741368a57b12bc49e0381f9281e6e5336d727307ee904072527b739325e2a
MD5 f667b685b53642a91b18f09ba95964ac
BLAKE2b-256 01715ecf58fb6200620f0803464b396c66b9ac53a9b264fc52458ae41256e81e

See more details on using hashes here.

File details

Details for the file flake8_flask-0.3.0b1-py3-none-any.whl.

File metadata

  • Download URL: flake8_flask-0.3.0b1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.4.0 requests-toolbelt/0.8.0 tqdm/4.36.1 CPython/3.7.2

File hashes

Hashes for flake8_flask-0.3.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1ea577647ffc3619c69dac7d7cea16f2c94f19153dfc75f404a64610d261c5f
MD5 f59891763424f95d2471cf3874c55845
BLAKE2b-256 e2ad5bdd7404d0a88559e3c7d7206a088f0e70b158b4ee16f40f8edcb1eed9ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page