pyrsistent
Persistent/Functional/Immutable data structures
Install
pyrsistent on PyPI
pip
pip install pyrsistentuv
uv add pyrsistentpoetry
poetry add pyrsistentPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 1,023 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pyrsistent-0.20.0-py3-none-any.whl
About pyrsistent
from the package's own PyPI description — quoted content, verbatim
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...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
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.
Installation is straightforward with a pure-wheel distribution and no runtime dependencies. The package is aging (last release October 2023, over 1000 days old) but remains actively maintained with a stable repository and 2196 GitHub stars.
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Usage
pip install pyrsistent==0.20.0
from pyrsistent import v, m, s
v1 = v(1, 2, 3)
v2 = v1.append(4)
m1 = m(a=1, b=2)
m2 = m1.set('c', 3)
s1 = s(1, 2, 3)
s2 = s1.add(4)
Requires Python 3.8 or later.
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.
Needs verification
- Whether the 1000-day gap since last release reflects active maintenance or dormancy despite the repository not being archived
- Performance characteristics and memory overhead compared to standard Python collections for typical use cases
Similar packages
permissive · top 1,000 on PyPI
rpds-pypermissive · top 100 on PyPI
smmappermissive · top 1,000 on PyPI
graphql-relaypermissive · top 1,000 on PyPI
google-cloud-spannerpermissive · top 1,000 on PyPI
dacitepermissive · top 1,000 on PyPI
tblibpermissive · top 1,000 on PyPI
librtpermissive · top 1,000 on PyPI
cachetoolspermissive · top 1,000 on PyPI
jsonpath-ngpermissive · top 1,000 on PyPI