MCPcopy
hub / github.com/rsxdalv/TTS-WebUI / get

Method get

tts_webui/database/models.py:335–341  ·  view source on GitHub ↗

Get a preference value.

(category: str, key: str, user_id: int = 1, default: Any = None)

Source from the content-addressed store, hash-verified

333
334 @staticmethod
335 def get(category: str, key: str, user_id: int = 1, default: Any = None) -> Any:
336 """Get a preference value."""
337 query = "SELECT value FROM user_preferences WHERE user_id = ? AND category = ? AND key = ?"
338 result = execute_query(query, (user_id, category, key), fetch_one=True)
339 if result:
340 return json.loads(result["value"])
341 return default
342
343 @staticmethod
344 def get_category(category: str, user_id: int = 1) -> Dict[str, Any]:

Callers 15

server.pyFile · 0.80
start_gradio_serverFunction · 0.80
_get_typed_dict_nameFunction · 0.80
main.pyFile · 0.80
_proxy_headersFunction · 0.80
proxy_httpFunction · 0.80
proxy_wsFunction · 0.80
get_db_pathFunction · 0.80
get_by_idMethod · 0.80
list_allMethod · 0.80
_log_to_databaseFunction · 0.80

Calls 1

execute_queryFunction · 0.85