pyaiml21.botconfig.misc.Properties

class pyaiml21.botconfig.misc.Properties(other: Optional[Mapping[str, str]] = None)[source][source]

Properties of the bot.

Similar interface as a Python’s dictionary, but keeping all the values in uppercase.

Example:
>>> bot_props = Properties()
>>> bot_props["name"] = "MyBot"
>>> bot_props["age"] = "19"
>>> int(bot_props["age"])
19
>>> "name" in bot_props
True
>>> bot_props["name"] == "MYBOT"
True

Methods

get

Get bot's property or return default if not found.

update

Update bot's properties.

get(key: str, default: Optional[str] = None)[source][source]

Get bot’s property or return default if not found.

update(other: Mapping[str, str])[source][source]

Update bot’s properties.