<p>There are currently 5 <a href="https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html" rel="nofollow noreferrer">dunder dictionaries</a>. They are available at runtime and generally not stored statically.</p>

<p><code>__opts__</code>    - Master or Minion configuration options; stored in configuration files of master and minion, collected at startup</p>

<p><code>__salt__</code>    - Execution module functions (i.e. <code>__salt__['test.echo']('foo')</code>); from built-in and <a href="https://docs.saltstack.com/en/latest/ref/modules/index.html" rel="nofollow noreferrer">custom execution modules</a> stored in <code>_modules/</code></p>

<p><code>__grains__</code>  - Grains (i.e. <code>__grains__['os']</code>); collected from minions, dynamically generated, or <a href="https://docs.saltstack.com/en/latest/topics/grains/#grains-in-the-minion-config" rel="nofollow noreferrer">stored in minion config</a> or <a href="https://docs.saltstack.com/en/latest/topics/grains/#grains-in-etc-salt-grains" rel="nofollow noreferrer"><code>/etc/salt/grains</code></a></p>

<p><code>__pillar__</code>  - Pillar data (i.e. <code>__pillar__['foo']</code>); collected from the pillar</p>

<p><code>__context__</code> - Context defined in state modules and execution modules</p>

<p>You generally don't need to use them, unless you are developing Salt or writing custom modules, runners, returners, or external pillars.</p>

CC BY-SA 4.0
2022-09-12T20:42:31.010Z
New doc location: https://docs.saltproject.io/en/latest/topics/development/modules/developing.html#dunder-dictionaries, and it now lists fifteen (though not all are available in all contexts).
OrangeDog
CC BY-SA 4.0
2018-08-02T15:53:15.163Z
2018-08-02T15:53:15.163Z
A. Z.
<p>I am new to Salt-Stack wanted to know where are all the dunder dictionaries stored?</p>
<p>For example <code>__salt__</code>, <code>__opts__</code>, <code>__grains__</code>, <code>__beacons__</code>).</p>

CC BY-SA 4.0
2022-09-12T20:41:40.690Z
What do you mean "stored"?
OrangeDog
<deployment><configuration-management><configuration><salt><storage>
Where are dunder dictionaries stored in salt?
Dheeraj Chelaramani
# Where are dunder dictionaries stored in salt?

(Asked by: username_0 on 2018-07-31)

I am new to Salt-Stack wanted to know where are all the dunder dictionaries stored?

For example `__salt__`, `__opts__`, `__grains__`, `__beacons__`).

**Tags:** deployment, configuration-management, configuration, salt, storage

> **Comments:**
> **username_1**: What do you mean "stored"?  

---

## 1 answers

### Answer by username_2 on 2018-08-02. Score: 3

There are currently 5 [dunder dictionaries](https://docs.saltstack.com/en/latest/topics/development/dunder_dictionaries.html). They are available at runtime and generally not stored statically.

`__opts__` - Master or Minion configuration options; stored in configuration files of master and minion, collected at startup

`__salt__` - Execution module functions (i.e. `__salt__['test.echo']('foo')`); from built-in and [custom execution modules](https://docs.saltstack.com/en/latest/ref/modules/index.html) stored in `_modules/`

`__grains__` - Grains (i.e. `__grains__['os']`); collected from minions, dynamically generated, or [stored in minion config](https://docs.saltstack.com/en/latest/topics/grains/#grains-in-the-minion-config) or [`/etc/salt/grains`](https://docs.saltstack.com/en/latest/topics/grains/#grains-in-etc-salt-grains)

`__pillar__` - Pillar data (i.e. `__pillar__['foo']`); collected from the pillar

`__context__` - Context defined in state modules and execution modules

You generally don't need to use them, unless you are developing Salt or writing custom modules, runners, returners, or external pillars.

> **Comments:**
> **username_1**: New doc location: https://docs.saltproject.io/en/latest/topics/development/modules/developing.html#dunder-dictionaries, and it now lists fifteen (though not all are available in all contexts).  

---

