coltone24
Mmarimo
•Created by coltone24 on 1/13/2025 in #help-support
Accessing Middleware Values in a Marimo Cell
I'm running a FastAPI server with Marimo and using SessionMiddleware to manage authentication via a cookie containing the access token. Here's the FastAPI setup:
In the Marimo app code, I can access the access_token from the session middleware, but I can't figure out how to access the same value within a Marimo cell. Here's the cell code:
1. How can I properly access the values outside the cell (like access_token) in a Marimo cell?
2. Is there a recommended approach for passing session values from FastAPI's middleware into Marimo's context or cells?
Any guidance or examples would be appreciated!
11 replies