spork-pds
spork-pds 0.1.4
Fast immutable persistent collections, transient builders, typed vectors, and native free-threading support.
spork-pds is the standalone CPython extension behind Spork’s persistent collection values. It has no dependency on the language or runtime and can be used directly from Python.
Install#
python -m pip install "spork-pds==0.1.4"
Published wheels cover supported CPython versions and platforms. A C compiler and Python development headers are required when building the source distribution.
Collection families#
Vector,Map, andSetprovide general persistent sequence, mapping, and set semantics.SortedVectorretains duplicates in a persistent red-black tree.DoubleVectorandIntVectorstore unboxed numeric values and export read-only buffers.Consprovides immutable linked-list cells.- Single-use transients make large controlled update batches efficient.
Persistent operations return new values while sharing unchanged structure. Existing versions remain unchanged. Immutability is shallow: Python objects stored inside a collection retain their own behavior.