Version: 1.0.0 Protocol Version: 2024-11-05 Last Updated: 2026-01-10
"g" is a threadlocal magic object that lets developer add / change / remove attributes during the request lifecycle. Learn more about this "g" here.
There is no OTB equivalent in FastAPI, but thanks to the new contextvars Python 3.7+ module, I made this simple demo.
Any comment or help to improve yhis recipe is welcome.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jupyter: | |
| image: jupyter/datascience-notebook | |
| environment: | |
| - PASSWORD=${PASSWORD} | |
| nginx: | |
| image: nginx | |
| links: | |
| - jupyter |