> ## Documentation Index
> Fetch the complete documentation index at: https://ctrlrun-docs-python-3-13-3-14.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SQLiteStateStore

> Approvals, effects and evidence in one SQLite file (ARCHITECTURE §5).

`ctrlrun.SQLiteStateStore` — class, defined at `src/ctrlrun/state.py:1006`

```python theme={null}
from ctrlrun import SQLiteStateStore
```

```python theme={null}
class SQLiteStateStore
    def __init__(path: str | os.PathLike[str], *, clock: Callable[[], datetime] = _utc_now)
```

Approvals, effects and evidence in one SQLite file (ARCHITECTURE §5).

This is the store that makes reservation atomic across processes (SPEC-v0.1 §5.3 E1):
every decision is taken inside `BEGIN IMMEDIATE`, which holds the database's write lock,
and `effects.effect_key` is a primary key — the `UNIQUE(effect_key)` constraint — so an
insert that races past the lock still fails rather than overwriting a reservation.

A connection is opened per thread; `sqlite3` connections are not shareable. Separate
processes open the same file, which is the point.

## Next

* [Python API index](/docs/reference/api/index).
* [Get started](/docs/get-started/quickstart) · [Why](/docs/why).
