> Canonical guide: https://developers.foxlight.ai/build/sdk/reference/database/
> Contract snapshots: Skulk 2.0.0 (b0af39c79b6b7102b2478062904f1d7cc8619975); SDK 0.4.0 (31bb090b8f64689f87514e48385e22b6ad94a6c2). Check the installed runtime when versions differ.

# database API

SDK 0.4.0. This reference describes the supported authoring interface.

## `Database`

Open one connection per transaction; serialize cross-process reservations.

### `Database.__init__`



```python
def __init__(self, path: Path, schema: str, observed_time: Callable[[], int] | None=None) -> None:
    ...
```

### `Database.transaction`

Commit durable intent or roll back atomically on every exception.

```python
def transaction(self) -> Generator[sqlite3.Connection]:
    ...
```

### `Database.ownership`

Fence one complete reconciliation against concurrent journal owners.

```python
def ownership(self) -> Generator[None]:
    ...
```
