--- id: pyrsistent version: "0.20.0" license: MIT license_treatment: permissive maintenance: aging --- # pyrsistent — Persistent/Functional/Immutable data structures License: permissive · Maintenance: aging · Popularity: top 1,000 on PyPI ## Install pip install pyrsistent uv add pyrsistent poetry add pyrsistent ## Description Pyrsistent ========== .. image:: https://github.com/tobgu/pyrsistent/actions/workflows/tests.yaml/badge.svg :target: https://github.com/tobgu/pyrsistent/actions/workflows/tests.yaml .. _Pyrthon: https://www.github.com/tobgu/pyrthon .. _Pyrsistent_extras: https://github.com/mingmingrr/pyrsistent-extras Pyrsistent is a number of persistent collections (by some referred to as functional data structures). Persistent in the sense that they are immutable. All methods on a data structure that would normally mutate it instead return a new copy of the structure containing the requested updates. The original structure is left untouched. This will simplify the reasoning about what a program does since no hidden side effects ever can take place to these data structures. You can rest assured that the object you hold a reference to will remain the same throughout its lifetime and need not worry that somewhere five stack levels below you in the darkest corner of your application someone has decided to remove that element that you expected to be there. Pyrsistent is influenced by persistent data structures such as those found in the standard library of Clojure. The data structures... ## AI interpretation — verify before relying Pyrsistent provides immutable, persistent collections (vectors, maps, sets, records, and more) where all mutations return new copies, leaving originals unchanged and eliminating hidden side effects. Verdict: Pyrsistent is a mature, well-established library for functional-style immutable collections with zero runtime dependencies and permissive licensing. While aging (1000+ days since last release), its stable maintenance status, broad Python version support (3.8–3.12, PyPy), and absence of known vulnerabilities make it a reliable choice for projects requiring persistent data structures. [View on SkillFed](https://skillfed.io/packages/pyrsistent) · [View on PyPI](https://pypi.org/project/pyrsistent/)