<spanid="evennia-utils-optionhandler"></span><h1>evennia.utils.optionhandler<aclass="headerlink"href="#module-evennia.utils.optionhandler"title="Permalink to this headline">¶</a></h1>
<emclass="property">class </em><codeclass="sig-prename descclassname">evennia.utils.optionhandler.</code><codeclass="sig-name descname">InMemorySaveHandler</code><aclass="reference internal"href="../_modules/evennia/utils/optionhandler.html#InMemorySaveHandler"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.optionhandler.InMemorySaveHandler"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">__init__</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/optionhandler.html#InMemorySaveHandler.__init__"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.optionhandler.InMemorySaveHandler.__init__"title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self. See help(type(self)) for accurate signature.</p>
<codeclass="sig-name descname">add</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="n">value</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/optionhandler.html#InMemorySaveHandler.add"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.optionhandler.InMemorySaveHandler.add"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">get</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="n">default</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/optionhandler.html#InMemorySaveHandler.get"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.optionhandler.InMemorySaveHandler.get"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">get</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="n">default</span><spanclass="o">=</span><spanclass="default_value">None</span></em>, <emclass="sig-param"><spanclass="n">return_obj</span><spanclass="o">=</span><spanclass="default_value">False</span></em>, <emclass="sig-param"><spanclass="n">raise_error</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/optionhandler.html#OptionHandler.get"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.optionhandler.OptionHandler.get"title="Permalink to this definition">¶</a></dt>
<dd><p>Retrieves an Option stored in the handler. Will load it if it doesn’t exist.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>key</strong> (<em>str</em>) – The option key to retrieve.</p></li>
<li><p><strong>default</strong> (<em>any</em>) – What to return if the option is defined.</p></li>
<li><p><strong>return_obj</strong> (<em>bool</em><em>, </em><em>optional</em>) – If True, returns the actual option
object instead of its value.</p></li>
<li><p><strong>raise_error</strong> (<em>bool</em><em>, </em><em>optional</em>) – Raise Exception if key is not found in options.</p></li>
</ul>
</dd>
<dtclass="field-even">Returns</dt>
<ddclass="field-even"><p><em>option_value (any or Option)</em>– An option value the Option itself.</p>
</dd>
<dtclass="field-odd">Raises</dt>
<ddclass="field-odd"><p><strong>KeyError</strong>– If option is not defined.</p>
<codeclass="sig-name descname">set</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">key</span></em>, <emclass="sig-param"><spanclass="n">value</span></em>, <emclass="sig-param"><spanclass="o">**</span><spanclass="n">kwargs</span></em><spanclass="sig-paren">)</span>→ BaseOption<aclass="reference internal"href="../_modules/evennia/utils/optionhandler.html#OptionHandler.set"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.optionhandler.OptionHandler.set"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname">all</code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n">return_objs</span><spanclass="o">=</span><spanclass="default_value">False</span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/evennia/utils/optionhandler.html#OptionHandler.all"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#evennia.utils.optionhandler.OptionHandler.all"title="Permalink to this definition">¶</a></dt>
<dd><p>Get all options defined on this handler.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>return_objs</strong> (<em>bool</em><em>, </em><em>optional</em>) – Return the actual Option objects rather
<dt>All options on this handler, either <strong>{key: value}</strong></dt><dd><p>or <strong>{key: <Option>}</strong> if <strong>return_objs</strong> is <strong>True</strong>.</p>