Skip to main content

statepatch

Immer-style ops over a plain JSON tree.

observable(initial) wraps one value: .value reads it, every mutation applies to the tree and emits the matching op (replace / add / remove) to subscribers. Observables compose: an observable stored inside another mounts its op stream at that path.

from statepatch import observable

state = observable({"runs": []})
state.subscribe(print)

run = observable({"runId": "r1", "queue": []})
state["runs"].append(run)          # add op at ["runs", 0]
run["queue"].append({"id": "q1"})  # forwarded as add at ["runs", 0, "queue", 0]
state["runs"].pop(0)               # remove op; run is detached and reusable

Metadata

Release files for statepatch 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statepatch 0.2.0
File Size Uploaded
statepatch-0.2.0.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for statepatch 0.2.0
File Interpreter ABI Platform
statepatch-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / statepatch-0.2.0.tar.gz

Download URL statepatch-0.2.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
910691d121a7529e906125c0314ed369a761034c3725303d5176340002c92b77
BLAKE2b-256 checksum
How to use checksums
a944a30625901114f14d68f27068605710d96e037e53568fd4479112f036354d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / statepatch-0.2.0-py3-none-any.whl

Download URL statepatch-0.2.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8da52aad569811856d0ce125c1a2331df06275449d11c1bda81a92951c510aa3
BLAKE2b-256 checksum
How to use checksums
52fcac2358b59715af4815b81fb9ff4781b64d7a2b197fcfa3b76e568aff914f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.2

2 release files

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page