3 ms·
`g` is short for "global", but it is global to that request only. This makes data available to hooks which can wrap request handlers before/after they execute
by driggs 3y ago
`g` is short for "global", but it is global to that request only. This makes data available to hooks which can wrap request handlers before/after they execute
It's inspired by Flask's same functionality, though it's a part of the greater Application Context and Request Context in Flask, which Microdot apparently doesn't have:
https://flask.palletsprojects.com/en/2.3.x/appcontext/#storing-data https://flask.palletsprojects.com/en/2.3.x/appcontext/#stori...