User Configuration Operations

Used to set and retrieve user-defined configurations.

Example

 1import cassiasys
 2
 3try:
 4    cassiasys.save_user_config("hello")
 5    print(f"save user config ok")
 6except Exception as e:
 7    print(f"save user config failed: {e}")
 8
 9try:
10    config = cassiasys.read_user_config()
11    print(f"read user config ok: {config}")
12except Exception as e:
13    print(f"read user config failed: {e}")

API

cassiasys.save_user_config(config: str)

Saves the user configuration, which remains effective after a restart. An exception is thrown if saving fails, for example, when the size exceeds 16 KB.

Parameters:
  • config: Configuration content

cassiasys.read_user_config() str

Reads the user configuration. An exception is thrown if the read operation fails.

Returns:

  • config: Configuration content