Skip to content

Commit bf57a4c

Browse files
committed
update flask descriptions
1 parent 4c2da72 commit bf57a4c

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed

content/pages/examples/flask/flask-json-jsonencoder.markdown

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ sidebartitle: flask.json JSONEncoder
77
meta: Example code for understanding how to use the JSONEncoder class from the flask.json module of the Flask project.
88

99

10-
JSONEncoder is a class within the flask.json module of the Flask project.
10+
[JSONEncoder](https://github.com/pallets/flask/blob/master/src/flask/json/__init__.py)
11+
is a class within the [Flask](/flask.html) project under the `flask.json`
12+
module. `JSONEncoder` is the default [JSON](https://www.json.org/json-en.html)
13+
encoder for Flask and was designed to handle more types than Python's
14+
standard library [json](https://docs.python.org/3/library/json.html) module.
15+
1116

1217

1318
## Example 1 from Flask-Security-Too

content/pages/examples/flask/flask-json-jsonify.markdown

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ sidebartitle: flask.json jsonify
77
meta: Python example code that shows how to use the jsonify callable from the flask.json module of the Flask project.
88

99

10-
jsonify is a callable within the flask.json module of the Flask project.
10+
[jsonify](https://github.com/pallets/flask/blob/master/src/flask/json/__init__.py)
11+
is a function in [Flask](/flask.html)'s `flask.json` module. `jsonify`
12+
serializes data to
13+
[JavaScript Object Notation (JSON)](https://www.json.org/json-en.html) format,
14+
wraps it in a
15+
[Response](https://blog.miguelgrinberg.com/post/customizing-the-flask-response-class)
16+
object with the application/json mimetype.
17+
18+
Note that `jsonify` is sometimes imported directly from the `flask` module
19+
instead of from `flask.json`. It is the same function that is imported, but
20+
there are less characters to type when you leave off the `.json` part.
1121

1222

1323
## Example 1 from Flask AppBuilder

content/pages/examples/flask/flask-sessions-badsignature.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ sidebartitle: flask.sessions BadSignature
77
meta: Example code for understanding how to use the BadSignature class from the flask.sessions module of the Flask project.
88

99

10-
BadSignature is a class within the flask.sessions module of the Flask project.
10+
[BadSignature](https://github.com/pallets/flask/blob/master/src/flask/sessions.py)
11+
is a class often imported into [Flask](/flask.html) applications from
12+
the `flask.sessions` module. `BadSignature` is actually defined in the
13+
[itsdangerous](https://github.com/pallets/itsdangerous) project and
14+
imported into Flask sessions for applications to use.
1115

1216

1317
## Example 1 from FlaskBB

content/pages/examples/flask/flask-sessions-sessioninterface.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ sidebartitle: flask.sessions SessionInterface
77
meta: Example code for understanding how to use the SessionInterface class from the flask.sessions module of the Flask project.
88

99

10-
SessionInterface is a class within the flask.sessions module of the Flask project.
10+
[SessionInterface](https://github.com/pallets/flask/blob/master/src/flask/sessions.py)
11+
is a class used with [Flask](/flask.html) projects that is defined in
12+
the `flask.sessions` module. `SessionInterface` is the basic interface
13+
that must be implemented to replace the default session interface.
1114

1215

1316
## Example 1 from tedivms-flask

content/pages/examples/flask/flask-sessions-sessionmixin.markdown

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ sidebartitle: flask.sessions SessionMixin
77
meta: Example code for understanding how to use the SessionMixin class from the flask.sessions module of the Flask project.
88

99

10-
SessionMixin is a class within the flask.sessions module of the Flask project.
10+
[SessionMixin](https://github.com/pallets/flask/blob/master/src/flask/sessions.py)
11+
is a class used with [Flask](/flask.html) projects that is defined in
12+
the `flask.sessions` module. `SessionMixin` expands a standard
13+
[Python dictionary](https://docs.python.org/3/tutorial/datastructures.html#dictionaries)
14+
with [session](https://flask.palletsprojects.com/en/1.1.x/quickstart/#sessions)
15+
attributes.
1116

1217

1318
## Example 1 from Flask-SocketIO

0 commit comments

Comments
 (0)