Getting Started

Quick Start

Install the Python SDK and run your first delta-state operation in under a minute.

Install

$ pip install atomik-core

The four operations

from atomik_core import AtomikContext

# Create a single delta-state context
ctx = AtomikContext()

# LOAD — set the initial reference state
ctx.load(0xDEADBEEF)

# ACCUM — XOR a delta into the accumulator
ctx.accum(0x000000FF)

# READ — reconstruct current state (reference XOR accumulator)
assert ctx.read() == 0xDEADBE10

# SWAP — atomic snapshot + reset accumulator
snapshot = ctx.swap()
assert snapshot == 0xDEADBE10  # previous state
assert ctx.read() == 0xDEADBE10    # accumulator reset, state preserved

Key insight

State is never stored — it is reconstructed: current_state = initial_state ⊕ accumulator. Deltas are commutative, associative, and self-inverse (XOR Abelian group). Order does not matter. Duplicate deltas cancel. Zero dependencies, Python 3.9+.