mud_server.admin_gradio.utils

Utility functions for the MUD Client.

This module provides shared helper functions used across multiple tabs and components in the Gradio interface.

Functions

load_css(filename)

Load CSS from a file in the static directory.

create_session_state()

Create a new session state dictionary with default values.

Module Contents

mud_server.admin_gradio.utils.load_css(filename)[source]

Load CSS from a file in the static directory.

Parameters:

filename (str) – Name of the CSS file (e.g., ‘styles.css’)

Returns:

String containing the CSS content

Raises:

FileNotFoundError – If CSS file doesn’t exist

Return type:

str

mud_server.admin_gradio.utils.create_session_state()[source]

Create a new session state dictionary with default values.

Returns:

Dictionary with session state keys initialized

Return type:

dict