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.1

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.1
File Size Uploaded
statepatch-0.2.1.tar.gz 7.7 kB Details

Built distribution (wheel)

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

Total release size: 14.3 kB

Release files / statepatch-0.2.1.tar.gz

Download URL statepatch-0.2.1.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
04e84e509cd0a3b318195268153d663f20f787ef612c4591034dea82229ac3a2
BLAKE2b-256 checksum
How to use checksums
02bd9e2a3944bcd3b8a7cca3e0d67d1cfb9f4596cfb56d9208807c2d05e884d9
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 Sep 2, 2026.

Transparency log

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

Download URL statepatch-0.2.1-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc0b85173a4be842cd1bf3d47a05865362e7fec803fc126bf6d056517d041fb8
BLAKE2b-256 checksum
How to use checksums
98a3307a6efcc06e9ede2645616f8ebbab5931f4370e2550806ed6f176f864db
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 Sep 2, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.2

2 release files

This release

0.2.1 This release

2 release files

0.2.0

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