M
M
Muriam2021-12-22 07:49:41
Flask
Muriam, 2021-12-22 07:49:41

What is the Werkzeug in Flask for?

Werkzeug is a comprehensive WSGI web application library. It started as a simple collection of various utilities for WSGI applications and has become one of the most advanced WSGI utility libraries.

1) WSGI web application - what do you mean?
2) What are some examples of Werkzeug applications?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-12-22
@Muriam

WSGI web application - what do you mean?

WSGI is a protocol for communicating between a web server and a web application. Flask is a web application development framework using WSGI. Accordingly, all Flask applications are WSGI web applications.
What are some examples of Werkzeug applications?

I did a search in the catalog with projects, the first sections of code that came across:
from werkzeug.contrib.cache import MemcachedCache
cache = MemcachedCache(['127.0.0.1:11211'])

and
from werkzeug.security import generate_password_hash, check_password_hash

class User(db.Model):
    password = db.Column(db.String(80))

    def __init__(self, username, password, email):
        self.password = generate_password_hash(password)

    def check_password(self, password):
        return check_password_hash(self.password, password)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question