Skip to content

marimo

numerous.frameworks.marimo

Module for integrating Numerous with Marimo.

MarimoCookieGetter

Source code in numerous/frameworks/marimo.py
10
11
12
13
14
15
16
class MarimoCookieGetter:
    def cookies(self) -> dict[str, Any]:
        """Get the cookies associated with the current request."""
        cookies = marimo.cookies()
        if is_local_mode():
            session.set_user_info_cookie(cookies, local_user)
        return cookies

cookies()

Get the cookies associated with the current request.

Source code in numerous/frameworks/marimo.py
11
12
13
14
15
16
def cookies(self) -> dict[str, Any]:
    """Get the cookies associated with the current request."""
    cookies = marimo.cookies()
    if is_local_mode():
        session.set_user_info_cookie(cookies, local_user)
    return cookies

get_session()

Get the session for the current user.

Returns:

Type Description
Session

The session for the current user.

Source code in numerous/frameworks/marimo.py
19
20
21
22
23
24
25
26
27
def get_session() -> Session:
    """
    Get the session for the current user.

    Returns:
        The session for the current user.

    """
    return Session(cg=MarimoCookieGetter())