pyrsistent


Namepyrsistent JSON
Version 0.20.0 PyPI version JSON
download
home_pagehttps://github.com/tobgu/pyrsistent/
SummaryPersistent/Functional/Immutable data structures
upload_time2023-10-25 21:06:56
maintainer
docs_urlNone
authorTobias Gustafsson
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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 are designed to share common elements through path copying.
It aims at taking these concepts and make them as pythonic as possible so that they can be easily integrated into any python
program without hassle.

If you want use literal syntax to define them in your code rather
than function calls check out Pyrthon_. Be aware, that one is experimental, unmaintained and alpha software. 

If you cannot find the persistent data structure you're looking for here you may want to take a look at
Pyrsistent_extras_ which is maintained by @mingmingrr. If you still don't find what you're looking for please
open an issue for discussion. If we agree that functionality is missing you may want to go ahead and create
a Pull Request implement the missing functionality.

Examples
--------
.. _Sequence: collections_
.. _Hashable: collections_
.. _Mapping: collections_
.. _Mappings: collections_
.. _Set: collections_
.. _collections: https://docs.python.org/3/library/collections.abc.html
.. _documentation: http://pyrsistent.readthedocs.org/

The collection types and key features currently implemented are:

* PVector_, similar to a python list
* PMap_, similar to dict
* PSet_, similar to set
* PRecord_, a PMap on steroids with fixed fields, optional type and invariant checking and much more
* PClass_, a Python class fixed fields, optional type and invariant checking and much more
* `Checked collections`_, PVector, PMap and PSet with optional type and invariance checks and more
* PBag, similar to collections.Counter
* PList, a classic singly linked list
* PDeque, similar to collections.deque
* Immutable object type (immutable) built on the named tuple
* freeze_ and thaw_ functions to convert between pythons standard collections and pyrsistent collections.
* Flexible transformations_ of arbitrarily complex structures built from PMaps and PVectors.

Below are examples of common usage patterns for some of the structures and features. More information and
full documentation for all data structures is available in the documentation_.

.. _PVector:

PVector
~~~~~~~
With full support for the Sequence_ protocol PVector is meant as a drop in replacement to the built in list from a readers
point of view. Write operations of course differ since no in place mutation is done but naming should be in line
with corresponding operations on the built in list.

Support for the Hashable_ protocol also means that it can be used as key in Mappings_.

Appends are amortized O(1). Random access and insert is log32(n) where n is the size of the vector.

.. code:: python

    >>> from pyrsistent import v, pvector

    # No mutation of vectors once created, instead they
    # are "evolved" leaving the original untouched
    >>> v1 = v(1, 2, 3)
    >>> v2 = v1.append(4)
    >>> v3 = v2.set(1, 5)
    >>> v1
    pvector([1, 2, 3])
    >>> v2
    pvector([1, 2, 3, 4])
    >>> v3
    pvector([1, 5, 3, 4])

    # Random access and slicing
    >>> v3[1]
    5
    >>> v3[1:3]
    pvector([5, 3])

    # Iteration
    >>> list(x + 1 for x in v3)
    [2, 6, 4, 5]
    >>> pvector(2 * x for x in range(3))
    pvector([0, 2, 4])

.. _PMap:

PMap
~~~~
With full support for the Mapping_ protocol PMap is meant as a drop in replacement to the built in dict from a readers point
of view. Support for the Hashable_ protocol also means that it can be used as key in other Mappings_.

Random access and insert is log32(n) where n is the size of the map.

.. code:: python

    >>> from pyrsistent import m, pmap, v

    # No mutation of maps once created, instead they are
    # "evolved" leaving the original untouched
    >>> m1 = m(a=1, b=2)
    >>> m2 = m1.set('c', 3)
    >>> m3 = m2.set('a', 5)
    >>> m1
    pmap({'a': 1, 'b': 2})
    >>> m2
    pmap({'a': 1, 'c': 3, 'b': 2})
    >>> m3
    pmap({'a': 5, 'c': 3, 'b': 2})
    >>> m3['a']
    5

    # Evolution of nested persistent structures
    >>> m4 = m(a=5, b=6, c=v(1, 2))
    >>> m4.transform(('c', 1), 17)
    pmap({'a': 5, 'c': pvector([1, 17]), 'b': 6})
    >>> m5 = m(a=1, b=2)

    # Evolve by merging with other mappings
    >>> m5.update(m(a=2, c=3), {'a': 17, 'd': 35})
    pmap({'a': 17, 'c': 3, 'b': 2, 'd': 35})
    >>> pmap({'x': 1, 'y': 2}) + pmap({'y': 3, 'z': 4})
    pmap({'y': 3, 'x': 1, 'z': 4})

    # Dict-like methods to convert to list and iterate
    >>> m3.items()
    pvector([('a', 5), ('c', 3), ('b', 2)])
    >>> list(m3)
    ['a', 'c', 'b']

.. _PSet:

PSet
~~~~
With full support for the Set_ protocol PSet is meant as a drop in replacement to the built in set from a readers point
of view. Support for the Hashable_ protocol also means that it can be used as key in Mappings_.

Random access and insert is log32(n) where n is the size of the set.

.. code:: python

    >>> from pyrsistent import s

    # No mutation of sets once created, you know the story...
    >>> s1 = s(1, 2, 3, 2)
    >>> s2 = s1.add(4)
    >>> s3 = s1.remove(1)
    >>> s1
    pset([1, 2, 3])
    >>> s2
    pset([1, 2, 3, 4])
    >>> s3
    pset([2, 3])

    # Full support for set operations
    >>> s1 | s(3, 4, 5)
    pset([1, 2, 3, 4, 5])
    >>> s1 & s(3, 4, 5)
    pset([3])
    >>> s1 < s2
    True
    >>> s1 < s(3, 4, 5)
    False

.. _PRecord:

PRecord
~~~~~~~
A PRecord is a PMap with a fixed set of specified fields. Records are declared as python classes inheriting
from PRecord. Because it is a PMap it has full support for all Mapping methods such as iteration and element
access using subscript notation.

.. code:: python

    >>> from pyrsistent import PRecord, field
    >>> class ARecord(PRecord):
    ...     x = field()
    ...
    >>> r = ARecord(x=3)
    >>> r
    ARecord(x=3)
    >>> r.x
    3
    >>> r.set(x=2)
    ARecord(x=2)
    >>> r.set(y=2)
    Traceback (most recent call last):
    AttributeError: 'y' is not among the specified fields for ARecord

Type information
****************
It is possible to add type information to the record to enforce type checks. Multiple allowed types can be specified
by providing an iterable of types.

.. code:: python

    >>> class BRecord(PRecord):
    ...     x = field(type=int)
    ...     y = field(type=(int, type(None)))
    ...
    >>> BRecord(x=3, y=None)
    BRecord(y=None, x=3)
    >>> BRecord(x=3.0)
    Traceback (most recent call last):
    PTypeError: Invalid type for field BRecord.x, was float


Custom types (classes) that are iterable should be wrapped in a tuple to prevent their
members being added to the set of valid types.  Although Enums in particular are now
supported without wrapping, see #83 for more information.

Mandatory fields
****************
Fields are not mandatory by default but can be specified as such. If fields are missing an
*InvariantException* will be thrown which contains information about the missing fields.

.. code:: python

    >>> from pyrsistent import InvariantException
    >>> class CRecord(PRecord):
    ...     x = field(mandatory=True)
    ...
    >>> r = CRecord(x=3)
    >>> try:
    ...    r.discard('x')
    ... except InvariantException as e:
    ...    print(e.missing_fields)
    ...
    ('CRecord.x',)

Invariants
**********
It is possible to add invariants that must hold when evolving the record. Invariants can be
specified on both field and record level. If invariants fail an *InvariantException* will be
thrown which contains information about the failing invariants. An invariant function should
return a tuple consisting of a boolean that tells if the invariant holds or not and an object
describing the invariant. This object can later be used to identify which invariant that failed.

The global invariant function is only executed if all field invariants hold.

Global invariants are inherited to subclasses.

.. code:: python

    >>> class RestrictedVector(PRecord):
    ...     __invariant__ = lambda r: (r.y >= r.x, 'x larger than y')
    ...     x = field(invariant=lambda x: (x > 0, 'x negative'))
    ...     y = field(invariant=lambda y: (y > 0, 'y negative'))
    ...
    >>> r = RestrictedVector(y=3, x=2)
    >>> try:
    ...    r.set(x=-1, y=-2)
    ... except InvariantException as e:
    ...    print(e.invariant_errors)
    ...
    ('y negative', 'x negative')
    >>> try:
    ...    r.set(x=2, y=1)
    ... except InvariantException as e:
    ...    print(e.invariant_errors)
    ...
    ('x larger than y',)

Invariants may also contain multiple assertions. For those cases the invariant function should
return a tuple of invariant tuples as described above. This structure is reflected in the
invariant_errors attribute of the exception which will contain tuples with data from all failed
invariants. Eg:

.. code:: python

    >>> class EvenX(PRecord):
    ...     x = field(invariant=lambda x: ((x > 0, 'x negative'), (x % 2 == 0, 'x odd')))
    ...
    >>> try:
    ...    EvenX(x=-1)
    ... except InvariantException as e:
    ...    print(e.invariant_errors)
    ...
    (('x negative', 'x odd'),)


Factories
*********
It's possible to specify factory functions for fields. The factory function receives whatever
is supplied as field value and the actual returned by the factory is assigned to the field
given that any type and invariant checks hold.
PRecords have a default factory specified as a static function on the class, create(). It takes
a *Mapping* as argument and returns an instance of the specific record.
If a record has fields of type PRecord the create() method of that record will
be called to create the "sub record" if no factory has explicitly been specified to override
this behaviour.

.. code:: python

    >>> class DRecord(PRecord):
    ...     x = field(factory=int)
    ...
    >>> class ERecord(PRecord):
    ...     d = field(type=DRecord)
    ...
    >>> ERecord.create({'d': {'x': '1'}})
    ERecord(d=DRecord(x=1))

Collection fields
*****************
It is also possible to have fields with ``pyrsistent`` collections.

.. code:: python

   >>> from pyrsistent import pset_field, pmap_field, pvector_field
   >>> class MultiRecord(PRecord):
   ...     set_of_ints = pset_field(int)
   ...     map_int_to_str = pmap_field(int, str)
   ...     vector_of_strs = pvector_field(str)
   ...

Serialization
*************
PRecords support serialization back to dicts. Default serialization will take keys and values
"as is" and output them into a dict. It is possible to specify custom serialization functions
to take care of fields that require special treatment.

.. code:: python

    >>> from datetime import date
    >>> class Person(PRecord):
    ...     name = field(type=unicode)
    ...     birth_date = field(type=date,
    ...                        serializer=lambda format, d: d.strftime(format['date']))
    ...
    >>> john = Person(name=u'John', birth_date=date(1985, 10, 21))
    >>> john.serialize({'date': '%Y-%m-%d'})
    {'birth_date': '1985-10-21', 'name': u'John'}


.. _instar: https://github.com/boxed/instar/

.. _PClass:

PClass
~~~~~~
A PClass is a python class with a fixed set of specified fields. PClasses are declared as python classes inheriting
from PClass. It is defined the same way that PRecords are and behaves like a PRecord in all aspects except that it
is not a PMap and hence not a collection but rather a plain Python object.

.. code:: python

    >>> from pyrsistent import PClass, field
    >>> class AClass(PClass):
    ...     x = field()
    ...
    >>> a = AClass(x=3)
    >>> a
    AClass(x=3)
    >>> a.x
    3


Checked collections
~~~~~~~~~~~~~~~~~~~
Checked collections currently come in three flavors: CheckedPVector, CheckedPMap and CheckedPSet.

.. code:: python

    >>> from pyrsistent import CheckedPVector, CheckedPMap, CheckedPSet, thaw
    >>> class Positives(CheckedPSet):
    ...     __type__ = (long, int)
    ...     __invariant__ = lambda n: (n >= 0, 'Negative')
    ...
    >>> class Lottery(PRecord):
    ...     name = field(type=str)
    ...     numbers = field(type=Positives, invariant=lambda p: (len(p) > 0, 'No numbers'))
    ...
    >>> class Lotteries(CheckedPVector):
    ...     __type__ = Lottery
    ...
    >>> class LotteriesByDate(CheckedPMap):
    ...     __key_type__ = date
    ...     __value_type__ = Lotteries
    ...
    >>> lotteries = LotteriesByDate.create({date(2015, 2, 15): [{'name': 'SuperLotto', 'numbers': {1, 2, 3}},
    ...                                                         {'name': 'MegaLotto',  'numbers': {4, 5, 6}}],
    ...                                     date(2015, 2, 16): [{'name': 'SuperLotto', 'numbers': {3, 2, 1}},
    ...                                                         {'name': 'MegaLotto',  'numbers': {6, 5, 4}}]})
    >>> lotteries
    LotteriesByDate({datetime.date(2015, 2, 15): Lotteries([Lottery(numbers=Positives([1, 2, 3]), name='SuperLotto'), Lottery(numbers=Positives([4, 5, 6]), name='MegaLotto')]), datetime.date(2015, 2, 16): Lotteries([Lottery(numbers=Positives([1, 2, 3]), name='SuperLotto'), Lottery(numbers=Positives([4, 5, 6]), name='MegaLotto')])})

    # The checked versions support all operations that the corresponding
    # unchecked types do
    >>> lottery_0215 = lotteries[date(2015, 2, 15)]
    >>> lottery_0215.transform([0, 'name'], 'SuperDuperLotto')
    Lotteries([Lottery(numbers=Positives([1, 2, 3]), name='SuperDuperLotto'), Lottery(numbers=Positives([4, 5, 6]), name='MegaLotto')])

    # But also makes asserts that types and invariants hold
    >>> lottery_0215.transform([0, 'name'], 999)
    Traceback (most recent call last):
    PTypeError: Invalid type for field Lottery.name, was int

    >>> lottery_0215.transform([0, 'numbers'], set())
    Traceback (most recent call last):
    InvariantException: Field invariant failed

    # They can be converted back to python built ins with either thaw()
    # or serialize() (which provides possibilities to customize serialization)
    >>> thaw(lottery_0215)
    [{'numbers': set([1, 2, 3]), 'name': 'SuperLotto'}, {'numbers': set([4, 5, 6]), 'name': 'MegaLotto'}]
    >>> lottery_0215.serialize()
    [{'numbers': set([1, 2, 3]), 'name': 'SuperLotto'}, {'numbers': set([4, 5, 6]), 'name': 'MegaLotto'}]

.. _transformations:

Transformations
~~~~~~~~~~~~~~~
Transformations are inspired by the cool library instar_ for Clojure. They let you evolve PMaps and PVectors
with arbitrarily deep/complex nesting using simple syntax and flexible matching syntax.

The first argument to transformation is the path that points out the value to transform. The
second is the transformation to perform. If the transformation is callable it will be applied
to the value(s) matching the path. The path may also contain callables. In that case they are
treated as matchers. If the matcher returns True for a specific key it is considered for transformation.

.. code:: python

    # Basic examples
    >>> from pyrsistent import inc, freeze, thaw, rex, ny, discard
    >>> v1 = freeze([1, 2, 3, 4, 5])
    >>> v1.transform([2], inc)
    pvector([1, 2, 4, 4, 5])
    >>> v1.transform([lambda ix: 0 < ix < 4], 8)
    pvector([1, 8, 8, 8, 5])
    >>> v1.transform([lambda ix, v: ix == 0 or v == 5], 0)
    pvector([0, 2, 3, 4, 0])

    # The (a)ny matcher can be used to match anything
    >>> v1.transform([ny], 8)
    pvector([8, 8, 8, 8, 8])

    # Regular expressions can be used for matching
    >>> scores = freeze({'John': 12, 'Joseph': 34, 'Sara': 23})
    >>> scores.transform([rex('^Jo')], 0)
    pmap({'Joseph': 0, 'Sara': 23, 'John': 0})

    # Transformations can be done on arbitrarily deep structures
    >>> news_paper = freeze({'articles': [{'author': 'Sara', 'content': 'A short article'},
    ...                                   {'author': 'Steve', 'content': 'A slightly longer article'}],
    ...                      'weather': {'temperature': '11C', 'wind': '5m/s'}})
    >>> short_news = news_paper.transform(['articles', ny, 'content'], lambda c: c[:25] + '...' if len(c) > 25 else c)
    >>> very_short_news = news_paper.transform(['articles', ny, 'content'], lambda c: c[:15] + '...' if len(c) > 15 else c)
    >>> very_short_news.articles[0].content
    'A short article'
    >>> very_short_news.articles[1].content
    'A slightly long...'

    # When nothing has been transformed the original data structure is kept
    >>> short_news is news_paper
    True
    >>> very_short_news is news_paper
    False
    >>> very_short_news.articles[0] is news_paper.articles[0]
    True

    # There is a special transformation that can be used to discard elements. Also
    # multiple transformations can be applied in one call
    >>> thaw(news_paper.transform(['weather'], discard, ['articles', ny, 'content'], discard))
    {'articles': [{'author': 'Sara'}, {'author': 'Steve'}]}

Evolvers
~~~~~~~~
PVector, PMap and PSet all have support for a concept dubbed *evolvers*. An evolver acts like a mutable
view of the underlying persistent data structure with "transaction like" semantics. No updates of the original
data structure is ever performed, it is still fully immutable.

The evolvers have a very limited API by design to discourage excessive, and inappropriate, usage as that would
take us down the mutable road. In principle only basic mutation and element access functions are supported.
Check out the documentation_ of each data structure for specific examples.

Examples of when you may want to use an evolver instead of working directly with the data structure include:

* Multiple updates are done to the same data structure and the intermediate results are of no
  interest. In this case using an evolver may be a more efficient and easier to work with.
* You need to pass a vector into a legacy function or a function that you have no control
  over which performs in place mutations. In this case pass an evolver instance
  instead and then create a new pvector from the evolver once the function returns.

.. code:: python

    >>> from pyrsistent import v

    # In place mutation as when working with the built in counterpart
    >>> v1 = v(1, 2, 3)
    >>> e = v1.evolver()
    >>> e[1] = 22
    >>> e = e.append(4)
    >>> e = e.extend([5, 6])
    >>> e[5] += 1
    >>> len(e)
    6

    # The evolver is considered *dirty* when it contains changes compared to the underlying vector
    >>> e.is_dirty()
    True

    # But the underlying pvector still remains untouched
    >>> v1
    pvector([1, 2, 3])

    # Once satisfied with the updates you can produce a new pvector containing the updates.
    # The new pvector will share data with the original pvector in the same way that would have
    # been done if only using operations on the pvector.
    >>> v2 = e.persistent()
    >>> v2
    pvector([1, 22, 3, 4, 5, 7])

    # The evolver is now no longer considered *dirty* as it contains no differences compared to the
    # pvector just produced.
    >>> e.is_dirty()
    False

    # You may continue to work with the same evolver without affecting the content of v2
    >>> e[0] = 11

    # Or create a new evolver from v2. The two evolvers can be updated independently but will both
    # share data with v2 where possible.
    >>> e2 = v2.evolver()
    >>> e2[0] = 1111
    >>> e.persistent()
    pvector([11, 22, 3, 4, 5, 7])
    >>> e2.persistent()
    pvector([1111, 22, 3, 4, 5, 7])

.. _freeze:
.. _thaw:

freeze and thaw
~~~~~~~~~~~~~~~
These functions are great when your cozy immutable world has to interact with the evil mutable world outside.

.. code:: python

    >>> from pyrsistent import freeze, thaw, v, m
    >>> freeze([1, {'a': 3}])
    pvector([1, pmap({'a': 3})])
    >>> thaw(v(1, m(a=3)))
    [1, {'a': 3}]

By default, freeze will also recursively convert values inside PVectors and PMaps. This behaviour can be changed by providing freeze with the flag strict=False.

.. code:: python

    >>> from pyrsistent import freeze, v, m
    >>> freeze(v(1, v(2, [3])))
    pvector([1, pvector([2, pvector([3])])])
    >>> freeze(v(1, v(2, [3])), strict=False)
    pvector([1, pvector([2, [3]])])
    >>> freeze(m(a=m(b={'c': 1})))
    pmap({'a': pmap({'b': pmap({'c': 1})})})
    >>> freeze(m(a=m(b={'c': 1})), strict=False)
    pmap({'a': pmap({'b': {'c': 1}})})

In this regard, thaw operates as the inverse of freeze so will thaw values inside native data structures unless passed the strict=False flag.


Compatibility
-------------

Pyrsistent is developed and tested on Python 3.8+ and PyPy3.

Performance
-----------

Pyrsistent is developed with performance in mind. Still, while some operations are nearly on par with their built in,
mutable, counterparts in terms of speed, other operations are slower. In the cases where attempts at
optimizations have been done, speed has generally been valued over space.

Pyrsistent comes with two API compatible flavors of PVector (on which PMap and PSet are based), one pure Python
implementation and one implemented as a C extension. The latter generally being 2 - 20 times faster than the former.
The C extension will be used automatically when possible.

The pure python implementation is fully PyPy compatible. Running it under PyPy speeds operations up considerably if
the structures are used heavily (if JITed), for some cases the performance is almost on par with the built in counterparts.

Type hints
----------

PEP 561 style type hints for use with mypy and various editors are available for most types and functions in pyrsistent.

Type classes for annotating your own code with pyrsistent types are also available under pyrsistent.typing.

Installation
------------

pip install pyrsistent

Documentation
-------------

Available at http://pyrsistent.readthedocs.org/

Brief presentation available at http://slides.com/tobiasgustafsson/immutability-and-python/

Contributors
------------

Tobias Gustafsson https://github.com/tobgu

Christopher Armstrong https://github.com/radix

Anders Hovmöller https://github.com/boxed

Itamar Turner-Trauring https://github.com/itamarst

Jonathan Lange https://github.com/jml

Richard Futrell https://github.com/Futrell

Jakob Hollenstein https://github.com/jkbjh

David Honour https://github.com/foolswood

David R. MacIver https://github.com/DRMacIver

Marcus Ewert https://github.com/sarum90

Jean-Paul Calderone https://github.com/exarkun

Douglas Treadwell https://github.com/douglas-treadwell

Travis Parker https://github.com/teepark

Julian Berman https://github.com/Julian

Dennis Tomas https://github.com/dtomas

Neil Vyas https://github.com/neilvyas

doozr https://github.com/doozr

Kamil Galuszka https://github.com/galuszkak

Tsuyoshi Hombashi https://github.com/thombashi

nattofriends https://github.com/nattofriends

agberk https://github.com/agberk

Waleed Khan https://github.com/arxanas

Jean-Louis Fuchs https://github.com/ganwell

Carlos Corbacho https://github.com/ccorbacho

Felix Yan https://github.com/felixonmars

benrg https://github.com/benrg

Jere Lahelma https://github.com/je-l

Max Taggart https://github.com/MaxTaggart

Vincent Philippon https://github.com/vphilippon

Semen Zhydenko https://github.com/ss18

Till Varoquaux  https://github.com/till-varoquaux

Michal Kowalik https://github.com/michalvi

ossdev07 https://github.com/ossdev07

Kerry Olesen https://github.com/qhesz

johnthagen https://github.com/johnthagen

Bastien Vallet https://github.com/djailla

Ram Rachum  https://github.com/cool-RR

Vincent Philippon https://github.com/vphilippon

Andrey Bienkowski https://github.com/hexagonrecursion

Ethan McCue https://github.com/bowbahdoe

Jason R. Coombs https://github.com/jaraco

Nathan https://github.com/ndowens

Geert Barentsen https://github.com/barentsen

phil-arh https://github.com/phil-arh

Tamás Nepusz https://github.com/ntamas

Hugo van Kemenade https://github.com/hugovk

Ben Beasley https://github.com/musicinmybrain

Noah C. Benson https://github.com/noahbenson

dscrofts https://github.com/dscrofts

Andy Reagan https://github.com/andyreagan

Aaron Durant https://github.com/Aaron-Durant

Joshua Munn https://github.com/jams2

Lukas https://github.com/lukasK9999

Arshad https://github.com/arshad-ml

Contributing
------------

Want to contribute? That's great! If you experience problems please log them on GitHub. If you want to contribute code,
please fork the repository and submit a pull request.

Run tests
~~~~~~~~~
.. _tox: https://tox.readthedocs.io/en/latest/

Tests can be executed using tox_.

Install tox: ``pip install tox``

Run test for Python 3.8: ``tox -e py38``

Release
~~~~~~~
* `pip install -r requirements.txt`
* Update CHANGES.txt
* Update README.rst with any new contributors and potential info needed.
* Update _pyrsistent_version.py
* Commit and tag with new version: `git add -u . && git commit -m 'Prepare version vX.Y.Z' && git tag -a vX.Y.Z -m 'vX.Y.Z'`
* Push commit and tags: `git push --follow-tags`
* Build new release using Github actions

Project status
--------------
Pyrsistent can be considered stable and mature (who knows, there may even be a 1.0 some day :-)). The project is
maintained, bugs fixed, PRs reviewed and merged and new releases made. I currently do not have time for development
of new features or functionality which I don't have use for myself. I'm more than happy to take PRs for new
functionality though!

There are a bunch of issues marked with ``enhancement`` and ``help wanted`` that contain requests for new functionality
that would be nice to include. The level of difficulty and extend of the issues varies, please reach out to me if you're
interested in working on any of them.

If you feel that you have a grand master plan for where you would like Pyrsistent to go and have the time to put into
it please don't hesitate to discuss this with me and submit PRs for it. If all goes well I'd be more than happy to add
additional maintainers to the project!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tobgu/pyrsistent/",
    "name": "pyrsistent",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Tobias Gustafsson",
    "author_email": "tobias.l.gustafsson@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ce/3a/5031723c09068e9c8c2f0bc25c3a9245f2b1d1aea8396c787a408f2b95ca/pyrsistent-0.20.0.tar.gz",
    "platform": null,
    "description": "Pyrsistent\n==========\n.. image:: https://github.com/tobgu/pyrsistent/actions/workflows/tests.yaml/badge.svg\n    :target: https://github.com/tobgu/pyrsistent/actions/workflows/tests.yaml\n\n\n.. _Pyrthon: https://www.github.com/tobgu/pyrthon\n.. _Pyrsistent_extras: https://github.com/mingmingrr/pyrsistent-extras\n\nPyrsistent is a number of persistent collections (by some referred to as functional data structures). Persistent in\nthe sense that they are immutable.\n\nAll methods on a data structure that would normally mutate it instead return a new copy of the structure containing the\nrequested updates. The original structure is left untouched.\n\nThis will simplify the reasoning about what a program does since no hidden side effects ever can take place to these\ndata structures. You can rest assured that the object you hold a reference to will remain the same throughout its\nlifetime and need not worry that somewhere five stack levels below you in the darkest corner of your application\nsomeone has decided to remove that element that you expected to be there.\n\nPyrsistent is influenced by persistent data structures such as those found in the standard library of Clojure. The\ndata structures are designed to share common elements through path copying.\nIt aims at taking these concepts and make them as pythonic as possible so that they can be easily integrated into any python\nprogram without hassle.\n\nIf you want use literal syntax to define them in your code rather\nthan function calls check out Pyrthon_. Be aware, that one is experimental, unmaintained and alpha software. \n\nIf you cannot find the persistent data structure you're looking for here you may want to take a look at\nPyrsistent_extras_ which is maintained by @mingmingrr. If you still don't find what you're looking for please\nopen an issue for discussion. If we agree that functionality is missing you may want to go ahead and create\na Pull Request implement the missing functionality.\n\nExamples\n--------\n.. _Sequence: collections_\n.. _Hashable: collections_\n.. _Mapping: collections_\n.. _Mappings: collections_\n.. _Set: collections_\n.. _collections: https://docs.python.org/3/library/collections.abc.html\n.. _documentation: http://pyrsistent.readthedocs.org/\n\nThe collection types and key features currently implemented are:\n\n* PVector_, similar to a python list\n* PMap_, similar to dict\n* PSet_, similar to set\n* PRecord_, a PMap on steroids with fixed fields, optional type and invariant checking and much more\n* PClass_, a Python class fixed fields, optional type and invariant checking and much more\n* `Checked collections`_, PVector, PMap and PSet with optional type and invariance checks and more\n* PBag, similar to collections.Counter\n* PList, a classic singly linked list\n* PDeque, similar to collections.deque\n* Immutable object type (immutable) built on the named tuple\n* freeze_ and thaw_ functions to convert between pythons standard collections and pyrsistent collections.\n* Flexible transformations_ of arbitrarily complex structures built from PMaps and PVectors.\n\nBelow are examples of common usage patterns for some of the structures and features. More information and\nfull documentation for all data structures is available in the documentation_.\n\n.. _PVector:\n\nPVector\n~~~~~~~\nWith full support for the Sequence_ protocol PVector is meant as a drop in replacement to the built in list from a readers\npoint of view. Write operations of course differ since no in place mutation is done but naming should be in line\nwith corresponding operations on the built in list.\n\nSupport for the Hashable_ protocol also means that it can be used as key in Mappings_.\n\nAppends are amortized O(1). Random access and insert is log32(n) where n is the size of the vector.\n\n.. code:: python\n\n    >>> from pyrsistent import v, pvector\n\n    # No mutation of vectors once created, instead they\n    # are \"evolved\" leaving the original untouched\n    >>> v1 = v(1, 2, 3)\n    >>> v2 = v1.append(4)\n    >>> v3 = v2.set(1, 5)\n    >>> v1\n    pvector([1, 2, 3])\n    >>> v2\n    pvector([1, 2, 3, 4])\n    >>> v3\n    pvector([1, 5, 3, 4])\n\n    # Random access and slicing\n    >>> v3[1]\n    5\n    >>> v3[1:3]\n    pvector([5, 3])\n\n    # Iteration\n    >>> list(x + 1 for x in v3)\n    [2, 6, 4, 5]\n    >>> pvector(2 * x for x in range(3))\n    pvector([0, 2, 4])\n\n.. _PMap:\n\nPMap\n~~~~\nWith full support for the Mapping_ protocol PMap is meant as a drop in replacement to the built in dict from a readers point\nof view. Support for the Hashable_ protocol also means that it can be used as key in other Mappings_.\n\nRandom access and insert is log32(n) where n is the size of the map.\n\n.. code:: python\n\n    >>> from pyrsistent import m, pmap, v\n\n    # No mutation of maps once created, instead they are\n    # \"evolved\" leaving the original untouched\n    >>> m1 = m(a=1, b=2)\n    >>> m2 = m1.set('c', 3)\n    >>> m3 = m2.set('a', 5)\n    >>> m1\n    pmap({'a': 1, 'b': 2})\n    >>> m2\n    pmap({'a': 1, 'c': 3, 'b': 2})\n    >>> m3\n    pmap({'a': 5, 'c': 3, 'b': 2})\n    >>> m3['a']\n    5\n\n    # Evolution of nested persistent structures\n    >>> m4 = m(a=5, b=6, c=v(1, 2))\n    >>> m4.transform(('c', 1), 17)\n    pmap({'a': 5, 'c': pvector([1, 17]), 'b': 6})\n    >>> m5 = m(a=1, b=2)\n\n    # Evolve by merging with other mappings\n    >>> m5.update(m(a=2, c=3), {'a': 17, 'd': 35})\n    pmap({'a': 17, 'c': 3, 'b': 2, 'd': 35})\n    >>> pmap({'x': 1, 'y': 2}) + pmap({'y': 3, 'z': 4})\n    pmap({'y': 3, 'x': 1, 'z': 4})\n\n    # Dict-like methods to convert to list and iterate\n    >>> m3.items()\n    pvector([('a', 5), ('c', 3), ('b', 2)])\n    >>> list(m3)\n    ['a', 'c', 'b']\n\n.. _PSet:\n\nPSet\n~~~~\nWith full support for the Set_ protocol PSet is meant as a drop in replacement to the built in set from a readers point\nof view. Support for the Hashable_ protocol also means that it can be used as key in Mappings_.\n\nRandom access and insert is log32(n) where n is the size of the set.\n\n.. code:: python\n\n    >>> from pyrsistent import s\n\n    # No mutation of sets once created, you know the story...\n    >>> s1 = s(1, 2, 3, 2)\n    >>> s2 = s1.add(4)\n    >>> s3 = s1.remove(1)\n    >>> s1\n    pset([1, 2, 3])\n    >>> s2\n    pset([1, 2, 3, 4])\n    >>> s3\n    pset([2, 3])\n\n    # Full support for set operations\n    >>> s1 | s(3, 4, 5)\n    pset([1, 2, 3, 4, 5])\n    >>> s1 & s(3, 4, 5)\n    pset([3])\n    >>> s1 < s2\n    True\n    >>> s1 < s(3, 4, 5)\n    False\n\n.. _PRecord:\n\nPRecord\n~~~~~~~\nA PRecord is a PMap with a fixed set of specified fields. Records are declared as python classes inheriting\nfrom PRecord. Because it is a PMap it has full support for all Mapping methods such as iteration and element\naccess using subscript notation.\n\n.. code:: python\n\n    >>> from pyrsistent import PRecord, field\n    >>> class ARecord(PRecord):\n    ...     x = field()\n    ...\n    >>> r = ARecord(x=3)\n    >>> r\n    ARecord(x=3)\n    >>> r.x\n    3\n    >>> r.set(x=2)\n    ARecord(x=2)\n    >>> r.set(y=2)\n    Traceback (most recent call last):\n    AttributeError: 'y' is not among the specified fields for ARecord\n\nType information\n****************\nIt is possible to add type information to the record to enforce type checks. Multiple allowed types can be specified\nby providing an iterable of types.\n\n.. code:: python\n\n    >>> class BRecord(PRecord):\n    ...     x = field(type=int)\n    ...     y = field(type=(int, type(None)))\n    ...\n    >>> BRecord(x=3, y=None)\n    BRecord(y=None, x=3)\n    >>> BRecord(x=3.0)\n    Traceback (most recent call last):\n    PTypeError: Invalid type for field BRecord.x, was float\n\n\nCustom types (classes) that are iterable should be wrapped in a tuple to prevent their\nmembers being added to the set of valid types.  Although Enums in particular are now\nsupported without wrapping, see #83 for more information.\n\nMandatory fields\n****************\nFields are not mandatory by default but can be specified as such. If fields are missing an\n*InvariantException* will be thrown which contains information about the missing fields.\n\n.. code:: python\n\n    >>> from pyrsistent import InvariantException\n    >>> class CRecord(PRecord):\n    ...     x = field(mandatory=True)\n    ...\n    >>> r = CRecord(x=3)\n    >>> try:\n    ...    r.discard('x')\n    ... except InvariantException as e:\n    ...    print(e.missing_fields)\n    ...\n    ('CRecord.x',)\n\nInvariants\n**********\nIt is possible to add invariants that must hold when evolving the record. Invariants can be\nspecified on both field and record level. If invariants fail an *InvariantException* will be\nthrown which contains information about the failing invariants. An invariant function should\nreturn a tuple consisting of a boolean that tells if the invariant holds or not and an object\ndescribing the invariant. This object can later be used to identify which invariant that failed.\n\nThe global invariant function is only executed if all field invariants hold.\n\nGlobal invariants are inherited to subclasses.\n\n.. code:: python\n\n    >>> class RestrictedVector(PRecord):\n    ...     __invariant__ = lambda r: (r.y >= r.x, 'x larger than y')\n    ...     x = field(invariant=lambda x: (x > 0, 'x negative'))\n    ...     y = field(invariant=lambda y: (y > 0, 'y negative'))\n    ...\n    >>> r = RestrictedVector(y=3, x=2)\n    >>> try:\n    ...    r.set(x=-1, y=-2)\n    ... except InvariantException as e:\n    ...    print(e.invariant_errors)\n    ...\n    ('y negative', 'x negative')\n    >>> try:\n    ...    r.set(x=2, y=1)\n    ... except InvariantException as e:\n    ...    print(e.invariant_errors)\n    ...\n    ('x larger than y',)\n\nInvariants may also contain multiple assertions. For those cases the invariant function should\nreturn a tuple of invariant tuples as described above. This structure is reflected in the\ninvariant_errors attribute of the exception which will contain tuples with data from all failed\ninvariants. Eg:\n\n.. code:: python\n\n    >>> class EvenX(PRecord):\n    ...     x = field(invariant=lambda x: ((x > 0, 'x negative'), (x % 2 == 0, 'x odd')))\n    ...\n    >>> try:\n    ...    EvenX(x=-1)\n    ... except InvariantException as e:\n    ...    print(e.invariant_errors)\n    ...\n    (('x negative', 'x odd'),)\n\n\nFactories\n*********\nIt's possible to specify factory functions for fields. The factory function receives whatever\nis supplied as field value and the actual returned by the factory is assigned to the field\ngiven that any type and invariant checks hold.\nPRecords have a default factory specified as a static function on the class, create(). It takes\na *Mapping* as argument and returns an instance of the specific record.\nIf a record has fields of type PRecord the create() method of that record will\nbe called to create the \"sub record\" if no factory has explicitly been specified to override\nthis behaviour.\n\n.. code:: python\n\n    >>> class DRecord(PRecord):\n    ...     x = field(factory=int)\n    ...\n    >>> class ERecord(PRecord):\n    ...     d = field(type=DRecord)\n    ...\n    >>> ERecord.create({'d': {'x': '1'}})\n    ERecord(d=DRecord(x=1))\n\nCollection fields\n*****************\nIt is also possible to have fields with ``pyrsistent`` collections.\n\n.. code:: python\n\n   >>> from pyrsistent import pset_field, pmap_field, pvector_field\n   >>> class MultiRecord(PRecord):\n   ...     set_of_ints = pset_field(int)\n   ...     map_int_to_str = pmap_field(int, str)\n   ...     vector_of_strs = pvector_field(str)\n   ...\n\nSerialization\n*************\nPRecords support serialization back to dicts. Default serialization will take keys and values\n\"as is\" and output them into a dict. It is possible to specify custom serialization functions\nto take care of fields that require special treatment.\n\n.. code:: python\n\n    >>> from datetime import date\n    >>> class Person(PRecord):\n    ...     name = field(type=unicode)\n    ...     birth_date = field(type=date,\n    ...                        serializer=lambda format, d: d.strftime(format['date']))\n    ...\n    >>> john = Person(name=u'John', birth_date=date(1985, 10, 21))\n    >>> john.serialize({'date': '%Y-%m-%d'})\n    {'birth_date': '1985-10-21', 'name': u'John'}\n\n\n.. _instar: https://github.com/boxed/instar/\n\n.. _PClass:\n\nPClass\n~~~~~~\nA PClass is a python class with a fixed set of specified fields. PClasses are declared as python classes inheriting\nfrom PClass. It is defined the same way that PRecords are and behaves like a PRecord in all aspects except that it\nis not a PMap and hence not a collection but rather a plain Python object.\n\n.. code:: python\n\n    >>> from pyrsistent import PClass, field\n    >>> class AClass(PClass):\n    ...     x = field()\n    ...\n    >>> a = AClass(x=3)\n    >>> a\n    AClass(x=3)\n    >>> a.x\n    3\n\n\nChecked collections\n~~~~~~~~~~~~~~~~~~~\nChecked collections currently come in three flavors: CheckedPVector, CheckedPMap and CheckedPSet.\n\n.. code:: python\n\n    >>> from pyrsistent import CheckedPVector, CheckedPMap, CheckedPSet, thaw\n    >>> class Positives(CheckedPSet):\n    ...     __type__ = (long, int)\n    ...     __invariant__ = lambda n: (n >= 0, 'Negative')\n    ...\n    >>> class Lottery(PRecord):\n    ...     name = field(type=str)\n    ...     numbers = field(type=Positives, invariant=lambda p: (len(p) > 0, 'No numbers'))\n    ...\n    >>> class Lotteries(CheckedPVector):\n    ...     __type__ = Lottery\n    ...\n    >>> class LotteriesByDate(CheckedPMap):\n    ...     __key_type__ = date\n    ...     __value_type__ = Lotteries\n    ...\n    >>> lotteries = LotteriesByDate.create({date(2015, 2, 15): [{'name': 'SuperLotto', 'numbers': {1, 2, 3}},\n    ...                                                         {'name': 'MegaLotto',  'numbers': {4, 5, 6}}],\n    ...                                     date(2015, 2, 16): [{'name': 'SuperLotto', 'numbers': {3, 2, 1}},\n    ...                                                         {'name': 'MegaLotto',  'numbers': {6, 5, 4}}]})\n    >>> lotteries\n    LotteriesByDate({datetime.date(2015, 2, 15): Lotteries([Lottery(numbers=Positives([1, 2, 3]), name='SuperLotto'), Lottery(numbers=Positives([4, 5, 6]), name='MegaLotto')]), datetime.date(2015, 2, 16): Lotteries([Lottery(numbers=Positives([1, 2, 3]), name='SuperLotto'), Lottery(numbers=Positives([4, 5, 6]), name='MegaLotto')])})\n\n    # The checked versions support all operations that the corresponding\n    # unchecked types do\n    >>> lottery_0215 = lotteries[date(2015, 2, 15)]\n    >>> lottery_0215.transform([0, 'name'], 'SuperDuperLotto')\n    Lotteries([Lottery(numbers=Positives([1, 2, 3]), name='SuperDuperLotto'), Lottery(numbers=Positives([4, 5, 6]), name='MegaLotto')])\n\n    # But also makes asserts that types and invariants hold\n    >>> lottery_0215.transform([0, 'name'], 999)\n    Traceback (most recent call last):\n    PTypeError: Invalid type for field Lottery.name, was int\n\n    >>> lottery_0215.transform([0, 'numbers'], set())\n    Traceback (most recent call last):\n    InvariantException: Field invariant failed\n\n    # They can be converted back to python built ins with either thaw()\n    # or serialize() (which provides possibilities to customize serialization)\n    >>> thaw(lottery_0215)\n    [{'numbers': set([1, 2, 3]), 'name': 'SuperLotto'}, {'numbers': set([4, 5, 6]), 'name': 'MegaLotto'}]\n    >>> lottery_0215.serialize()\n    [{'numbers': set([1, 2, 3]), 'name': 'SuperLotto'}, {'numbers': set([4, 5, 6]), 'name': 'MegaLotto'}]\n\n.. _transformations:\n\nTransformations\n~~~~~~~~~~~~~~~\nTransformations are inspired by the cool library instar_ for Clojure. They let you evolve PMaps and PVectors\nwith arbitrarily deep/complex nesting using simple syntax and flexible matching syntax.\n\nThe first argument to transformation is the path that points out the value to transform. The\nsecond is the transformation to perform. If the transformation is callable it will be applied\nto the value(s) matching the path. The path may also contain callables. In that case they are\ntreated as matchers. If the matcher returns True for a specific key it is considered for transformation.\n\n.. code:: python\n\n    # Basic examples\n    >>> from pyrsistent import inc, freeze, thaw, rex, ny, discard\n    >>> v1 = freeze([1, 2, 3, 4, 5])\n    >>> v1.transform([2], inc)\n    pvector([1, 2, 4, 4, 5])\n    >>> v1.transform([lambda ix: 0 < ix < 4], 8)\n    pvector([1, 8, 8, 8, 5])\n    >>> v1.transform([lambda ix, v: ix == 0 or v == 5], 0)\n    pvector([0, 2, 3, 4, 0])\n\n    # The (a)ny matcher can be used to match anything\n    >>> v1.transform([ny], 8)\n    pvector([8, 8, 8, 8, 8])\n\n    # Regular expressions can be used for matching\n    >>> scores = freeze({'John': 12, 'Joseph': 34, 'Sara': 23})\n    >>> scores.transform([rex('^Jo')], 0)\n    pmap({'Joseph': 0, 'Sara': 23, 'John': 0})\n\n    # Transformations can be done on arbitrarily deep structures\n    >>> news_paper = freeze({'articles': [{'author': 'Sara', 'content': 'A short article'},\n    ...                                   {'author': 'Steve', 'content': 'A slightly longer article'}],\n    ...                      'weather': {'temperature': '11C', 'wind': '5m/s'}})\n    >>> short_news = news_paper.transform(['articles', ny, 'content'], lambda c: c[:25] + '...' if len(c) > 25 else c)\n    >>> very_short_news = news_paper.transform(['articles', ny, 'content'], lambda c: c[:15] + '...' if len(c) > 15 else c)\n    >>> very_short_news.articles[0].content\n    'A short article'\n    >>> very_short_news.articles[1].content\n    'A slightly long...'\n\n    # When nothing has been transformed the original data structure is kept\n    >>> short_news is news_paper\n    True\n    >>> very_short_news is news_paper\n    False\n    >>> very_short_news.articles[0] is news_paper.articles[0]\n    True\n\n    # There is a special transformation that can be used to discard elements. Also\n    # multiple transformations can be applied in one call\n    >>> thaw(news_paper.transform(['weather'], discard, ['articles', ny, 'content'], discard))\n    {'articles': [{'author': 'Sara'}, {'author': 'Steve'}]}\n\nEvolvers\n~~~~~~~~\nPVector, PMap and PSet all have support for a concept dubbed *evolvers*. An evolver acts like a mutable\nview of the underlying persistent data structure with \"transaction like\" semantics. No updates of the original\ndata structure is ever performed, it is still fully immutable.\n\nThe evolvers have a very limited API by design to discourage excessive, and inappropriate, usage as that would\ntake us down the mutable road. In principle only basic mutation and element access functions are supported.\nCheck out the documentation_ of each data structure for specific examples.\n\nExamples of when you may want to use an evolver instead of working directly with the data structure include:\n\n* Multiple updates are done to the same data structure and the intermediate results are of no\n  interest. In this case using an evolver may be a more efficient and easier to work with.\n* You need to pass a vector into a legacy function or a function that you have no control\n  over which performs in place mutations. In this case pass an evolver instance\n  instead and then create a new pvector from the evolver once the function returns.\n\n.. code:: python\n\n    >>> from pyrsistent import v\n\n    # In place mutation as when working with the built in counterpart\n    >>> v1 = v(1, 2, 3)\n    >>> e = v1.evolver()\n    >>> e[1] = 22\n    >>> e = e.append(4)\n    >>> e = e.extend([5, 6])\n    >>> e[5] += 1\n    >>> len(e)\n    6\n\n    # The evolver is considered *dirty* when it contains changes compared to the underlying vector\n    >>> e.is_dirty()\n    True\n\n    # But the underlying pvector still remains untouched\n    >>> v1\n    pvector([1, 2, 3])\n\n    # Once satisfied with the updates you can produce a new pvector containing the updates.\n    # The new pvector will share data with the original pvector in the same way that would have\n    # been done if only using operations on the pvector.\n    >>> v2 = e.persistent()\n    >>> v2\n    pvector([1, 22, 3, 4, 5, 7])\n\n    # The evolver is now no longer considered *dirty* as it contains no differences compared to the\n    # pvector just produced.\n    >>> e.is_dirty()\n    False\n\n    # You may continue to work with the same evolver without affecting the content of v2\n    >>> e[0] = 11\n\n    # Or create a new evolver from v2. The two evolvers can be updated independently but will both\n    # share data with v2 where possible.\n    >>> e2 = v2.evolver()\n    >>> e2[0] = 1111\n    >>> e.persistent()\n    pvector([11, 22, 3, 4, 5, 7])\n    >>> e2.persistent()\n    pvector([1111, 22, 3, 4, 5, 7])\n\n.. _freeze:\n.. _thaw:\n\nfreeze and thaw\n~~~~~~~~~~~~~~~\nThese functions are great when your cozy immutable world has to interact with the evil mutable world outside.\n\n.. code:: python\n\n    >>> from pyrsistent import freeze, thaw, v, m\n    >>> freeze([1, {'a': 3}])\n    pvector([1, pmap({'a': 3})])\n    >>> thaw(v(1, m(a=3)))\n    [1, {'a': 3}]\n\nBy default, freeze will also recursively convert values inside PVectors and PMaps. This behaviour can be changed by providing freeze with the flag strict=False.\n\n.. code:: python\n\n    >>> from pyrsistent import freeze, v, m\n    >>> freeze(v(1, v(2, [3])))\n    pvector([1, pvector([2, pvector([3])])])\n    >>> freeze(v(1, v(2, [3])), strict=False)\n    pvector([1, pvector([2, [3]])])\n    >>> freeze(m(a=m(b={'c': 1})))\n    pmap({'a': pmap({'b': pmap({'c': 1})})})\n    >>> freeze(m(a=m(b={'c': 1})), strict=False)\n    pmap({'a': pmap({'b': {'c': 1}})})\n\nIn this regard, thaw operates as the inverse of freeze so will thaw values inside native data structures unless passed the strict=False flag.\n\n\nCompatibility\n-------------\n\nPyrsistent is developed and tested on Python 3.8+ and PyPy3.\n\nPerformance\n-----------\n\nPyrsistent is developed with performance in mind. Still, while some operations are nearly on par with their built in,\nmutable, counterparts in terms of speed, other operations are slower. In the cases where attempts at\noptimizations have been done, speed has generally been valued over space.\n\nPyrsistent comes with two API compatible flavors of PVector (on which PMap and PSet are based), one pure Python\nimplementation and one implemented as a C extension. The latter generally being 2 - 20 times faster than the former.\nThe C extension will be used automatically when possible.\n\nThe pure python implementation is fully PyPy compatible. Running it under PyPy speeds operations up considerably if\nthe structures are used heavily (if JITed), for some cases the performance is almost on par with the built in counterparts.\n\nType hints\n----------\n\nPEP 561 style type hints for use with mypy and various editors are available for most types and functions in pyrsistent.\n\nType classes for annotating your own code with pyrsistent types are also available under pyrsistent.typing.\n\nInstallation\n------------\n\npip install pyrsistent\n\nDocumentation\n-------------\n\nAvailable at http://pyrsistent.readthedocs.org/\n\nBrief presentation available at http://slides.com/tobiasgustafsson/immutability-and-python/\n\nContributors\n------------\n\nTobias Gustafsson https://github.com/tobgu\n\nChristopher Armstrong https://github.com/radix\n\nAnders Hovm\u00f6ller https://github.com/boxed\n\nItamar Turner-Trauring https://github.com/itamarst\n\nJonathan Lange https://github.com/jml\n\nRichard Futrell https://github.com/Futrell\n\nJakob Hollenstein https://github.com/jkbjh\n\nDavid Honour https://github.com/foolswood\n\nDavid R. MacIver https://github.com/DRMacIver\n\nMarcus Ewert https://github.com/sarum90\n\nJean-Paul Calderone https://github.com/exarkun\n\nDouglas Treadwell https://github.com/douglas-treadwell\n\nTravis Parker https://github.com/teepark\n\nJulian Berman https://github.com/Julian\n\nDennis Tomas https://github.com/dtomas\n\nNeil Vyas https://github.com/neilvyas\n\ndoozr https://github.com/doozr\n\nKamil Galuszka https://github.com/galuszkak\n\nTsuyoshi Hombashi https://github.com/thombashi\n\nnattofriends https://github.com/nattofriends\n\nagberk https://github.com/agberk\n\nWaleed Khan https://github.com/arxanas\n\nJean-Louis Fuchs https://github.com/ganwell\n\nCarlos Corbacho https://github.com/ccorbacho\n\nFelix Yan https://github.com/felixonmars\n\nbenrg https://github.com/benrg\n\nJere Lahelma https://github.com/je-l\n\nMax Taggart https://github.com/MaxTaggart\n\nVincent Philippon https://github.com/vphilippon\n\nSemen Zhydenko https://github.com/ss18\n\nTill Varoquaux  https://github.com/till-varoquaux\n\nMichal Kowalik https://github.com/michalvi\n\nossdev07 https://github.com/ossdev07\n\nKerry Olesen https://github.com/qhesz\n\njohnthagen https://github.com/johnthagen\n\nBastien Vallet https://github.com/djailla\n\nRam Rachum  https://github.com/cool-RR\n\nVincent Philippon https://github.com/vphilippon\n\nAndrey Bienkowski https://github.com/hexagonrecursion\n\nEthan McCue https://github.com/bowbahdoe\n\nJason R. Coombs https://github.com/jaraco\n\nNathan https://github.com/ndowens\n\nGeert Barentsen https://github.com/barentsen\n\nphil-arh https://github.com/phil-arh\n\nTam\u00e1s Nepusz https://github.com/ntamas\n\nHugo van Kemenade https://github.com/hugovk\n\nBen Beasley https://github.com/musicinmybrain\n\nNoah C. Benson https://github.com/noahbenson\n\ndscrofts https://github.com/dscrofts\n\nAndy Reagan https://github.com/andyreagan\n\nAaron Durant https://github.com/Aaron-Durant\n\nJoshua Munn https://github.com/jams2\n\nLukas https://github.com/lukasK9999\n\nArshad https://github.com/arshad-ml\n\nContributing\n------------\n\nWant to contribute? That's great! If you experience problems please log them on GitHub. If you want to contribute code,\nplease fork the repository and submit a pull request.\n\nRun tests\n~~~~~~~~~\n.. _tox: https://tox.readthedocs.io/en/latest/\n\nTests can be executed using tox_.\n\nInstall tox: ``pip install tox``\n\nRun test for Python 3.8: ``tox -e py38``\n\nRelease\n~~~~~~~\n* `pip install -r requirements.txt`\n* Update CHANGES.txt\n* Update README.rst with any new contributors and potential info needed.\n* Update _pyrsistent_version.py\n* Commit and tag with new version: `git add -u . && git commit -m 'Prepare version vX.Y.Z' && git tag -a vX.Y.Z -m 'vX.Y.Z'`\n* Push commit and tags: `git push --follow-tags`\n* Build new release using Github actions\n\nProject status\n--------------\nPyrsistent can be considered stable and mature (who knows, there may even be a 1.0 some day :-)). The project is\nmaintained, bugs fixed, PRs reviewed and merged and new releases made. I currently do not have time for development\nof new features or functionality which I don't have use for myself. I'm more than happy to take PRs for new\nfunctionality though!\n\nThere are a bunch of issues marked with ``enhancement`` and ``help wanted`` that contain requests for new functionality\nthat would be nice to include. The level of difficulty and extend of the issues varies, please reach out to me if you're\ninterested in working on any of them.\n\nIf you feel that you have a grand master plan for where you would like Pyrsistent to go and have the time to put into\nit please don't hesitate to discuss this with me and submit PRs for it. If all goes well I'd be more than happy to add\nadditional maintainers to the project!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Persistent/Functional/Immutable data structures",
    "version": "0.20.0",
    "project_urls": {
        "Changelog": "https://pyrsistent.readthedocs.io/en/latest/changes.html",
        "Homepage": "https://github.com/tobgu/pyrsistent/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c719c343b14061907b629b765444b6436b160e2bd4184d17d4804bbe6381f6be",
                "md5": "1bd101c275232e36658dacebf3571fb4",
                "sha256": "8c3aba3e01235221e5b229a6c05f585f344734bd1ad42a8ac51493d74722bbce"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp310-cp310-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "1bd101c275232e36658dacebf3571fb4",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 83416,
            "upload_time": "2023-10-25T21:06:04",
            "upload_time_iso_8601": "2023-10-25T21:06:04.579823Z",
            "url": "https://files.pythonhosted.org/packages/c7/19/c343b14061907b629b765444b6436b160e2bd4184d17d4804bbe6381f6be/pyrsistent-0.20.0-cp310-cp310-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f4f8342079ea331031ef9ed57edd312a9ad283bcc8adfaf268931ae356a09a6",
                "md5": "d21472532762f9172db4e25afa84785e",
                "sha256": "c1beb78af5423b879edaf23c5591ff292cf7c33979734c99aa66d5914ead880f"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "d21472532762f9172db4e25afa84785e",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 118021,
            "upload_time": "2023-10-25T21:06:06",
            "upload_time_iso_8601": "2023-10-25T21:06:06.953759Z",
            "url": "https://files.pythonhosted.org/packages/9f/4f/8342079ea331031ef9ed57edd312a9ad283bcc8adfaf268931ae356a09a6/pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d7b764a125c488243965b7c5118352e47c6f89df95b4ac306d31cee409153d57",
                "md5": "f740f29d4eed085396e8fb663c1899fe",
                "sha256": "21cc459636983764e692b9eba7144cdd54fdec23ccdb1e8ba392a63666c60c34"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "f740f29d4eed085396e8fb663c1899fe",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 117747,
            "upload_time": "2023-10-25T21:06:08",
            "upload_time_iso_8601": "2023-10-25T21:06:08.500951Z",
            "url": "https://files.pythonhosted.org/packages/d7/b7/64a125c488243965b7c5118352e47c6f89df95b4ac306d31cee409153d57/pyrsistent-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fea543c67bd5f80df9e7583042398d12113263ec57f27c0607abe9d78395d18f",
                "md5": "c5e09017e2d67abb03997491601b9340",
                "sha256": "f5ac696f02b3fc01a710427585c855f65cd9c640e14f52abe52020722bb4906b"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "c5e09017e2d67abb03997491601b9340",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 114524,
            "upload_time": "2023-10-25T21:06:10",
            "upload_time_iso_8601": "2023-10-25T21:06:10.728813Z",
            "url": "https://files.pythonhosted.org/packages/fe/a5/43c67bd5f80df9e7583042398d12113263ec57f27c0607abe9d78395d18f/pyrsistent-0.20.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8a98b382a87e89ca839106d874f7bf78d226b3eedb26735eb6f751f1a3375f21",
                "md5": "1cb9692332c8187852d0b3a6f2a1eaa6",
                "sha256": "0724c506cd8b63c69c7f883cc233aac948c1ea946ea95996ad8b1380c25e1d3f"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp310-cp310-win32.whl",
            "has_sig": false,
            "md5_digest": "1cb9692332c8187852d0b3a6f2a1eaa6",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 60780,
            "upload_time": "2023-10-25T21:06:12",
            "upload_time_iso_8601": "2023-10-25T21:06:12.140071Z",
            "url": "https://files.pythonhosted.org/packages/8a/98/b382a87e89ca839106d874f7bf78d226b3eedb26735eb6f751f1a3375f21/pyrsistent-0.20.0-cp310-cp310-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "378a23e2193f7adea6901262e3cf39c7fe18ac0c446176c0ff0e19aeb2e9681e",
                "md5": "fc9ceecf4a57c285ab1d00778de36689",
                "sha256": "8441cf9616d642c475684d6cf2520dd24812e996ba9af15e606df5f6fd9d04a7"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "fc9ceecf4a57c285ab1d00778de36689",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 63310,
            "upload_time": "2023-10-25T21:06:13",
            "upload_time_iso_8601": "2023-10-25T21:06:13.598875Z",
            "url": "https://files.pythonhosted.org/packages/37/8a/23e2193f7adea6901262e3cf39c7fe18ac0c446176c0ff0e19aeb2e9681e/pyrsistent-0.20.0-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df637544dc7d0953294882a5c587fb1b10a26e0c23d9b92281a14c2514bac1f7",
                "md5": "f68a5ee0a6328a7e5eb36cfd98a16bf8",
                "sha256": "0f3b1bcaa1f0629c978b355a7c37acd58907390149b7311b5db1b37648eb6958"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp311-cp311-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "f68a5ee0a6328a7e5eb36cfd98a16bf8",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 83481,
            "upload_time": "2023-10-25T21:06:15",
            "upload_time_iso_8601": "2023-10-25T21:06:15.238771Z",
            "url": "https://files.pythonhosted.org/packages/df/63/7544dc7d0953294882a5c587fb1b10a26e0c23d9b92281a14c2514bac1f7/pyrsistent-0.20.0-cp311-cp311-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "aea049249bc14d71b1bf2ffe89703acfa86f2017c25cfdabcaea532b8c8a5810",
                "md5": "a014cd654b137db51f227bd2b8c8870b",
                "sha256": "5cdd7ef1ea7a491ae70d826b6cc64868de09a1d5ff9ef8d574250d0940e275b8"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "a014cd654b137db51f227bd2b8c8870b",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 120222,
            "upload_time": "2023-10-25T21:06:17",
            "upload_time_iso_8601": "2023-10-25T21:06:17.144368Z",
            "url": "https://files.pythonhosted.org/packages/ae/a0/49249bc14d71b1bf2ffe89703acfa86f2017c25cfdabcaea532b8c8a5810/pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1949808e8c9271424120289b9028a657da336ad7e43da0647f62e4f6011d19b",
                "md5": "c9a0f7b1376b920bca140055b9d92708",
                "sha256": "cae40a9e3ce178415040a0383f00e8d68b569e97f31928a3a8ad37e3fde6df6a"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c9a0f7b1376b920bca140055b9d92708",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 120002,
            "upload_time": "2023-10-25T21:06:18",
            "upload_time_iso_8601": "2023-10-25T21:06:18.727738Z",
            "url": "https://files.pythonhosted.org/packages/a1/94/9808e8c9271424120289b9028a657da336ad7e43da0647f62e4f6011d19b/pyrsistent-0.20.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3ff69ecfb78b2fc8e2540546db0fe19df1fae0f56664a5958c21ff8861b0f8da",
                "md5": "e88ff60c7e8626322e892390fb5f4373",
                "sha256": "6288b3fa6622ad8a91e6eb759cfc48ff3089e7c17fb1d4c59a919769314af224"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "e88ff60c7e8626322e892390fb5f4373",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 116850,
            "upload_time": "2023-10-25T21:06:20",
            "upload_time_iso_8601": "2023-10-25T21:06:20.424523Z",
            "url": "https://files.pythonhosted.org/packages/3f/f6/9ecfb78b2fc8e2540546db0fe19df1fae0f56664a5958c21ff8861b0f8da/pyrsistent-0.20.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "83c8e6d28bc27a0719f8eaae660357df9757d6e9ca9be2691595721de9e8adfc",
                "md5": "0b78b44577a01438085fc0e02b900e8c",
                "sha256": "7d29c23bdf6e5438c755b941cef867ec2a4a172ceb9f50553b6ed70d50dfd656"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp311-cp311-win32.whl",
            "has_sig": false,
            "md5_digest": "0b78b44577a01438085fc0e02b900e8c",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 60775,
            "upload_time": "2023-10-25T21:06:21",
            "upload_time_iso_8601": "2023-10-25T21:06:21.815800Z",
            "url": "https://files.pythonhosted.org/packages/83/c8/e6d28bc27a0719f8eaae660357df9757d6e9ca9be2691595721de9e8adfc/pyrsistent-0.20.0-cp311-cp311-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9887c6ef52ff30388f357922d08de012abdd3dc61e09311d88967bdae23ab657",
                "md5": "3b09759c0f93d8cefda709a1ad0995f2",
                "sha256": "59a89bccd615551391f3237e00006a26bcf98a4d18623a19909a2c48b8e986ee"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "3b09759c0f93d8cefda709a1ad0995f2",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 63306,
            "upload_time": "2023-10-25T21:06:22",
            "upload_time_iso_8601": "2023-10-25T21:06:22.874515Z",
            "url": "https://files.pythonhosted.org/packages/98/87/c6ef52ff30388f357922d08de012abdd3dc61e09311d88967bdae23ab657/pyrsistent-0.20.0-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "15eeff2ed52032ac1ce2e7ba19e79bd5b05d152ebfb77956cf08fcd6e8d760ea",
                "md5": "080fa283496ba77169b6e056019913cc",
                "sha256": "09848306523a3aba463c4b49493a760e7a6ca52e4826aa100ee99d8d39b7ad1e"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp312-cp312-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "080fa283496ba77169b6e056019913cc",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 83537,
            "upload_time": "2023-10-25T21:06:24",
            "upload_time_iso_8601": "2023-10-25T21:06:24.170583Z",
            "url": "https://files.pythonhosted.org/packages/15/ee/ff2ed52032ac1ce2e7ba19e79bd5b05d152ebfb77956cf08fcd6e8d760ea/pyrsistent-0.20.0-cp312-cp312-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80f1338d0050b24c3132bcfc79b68c3a5f54bce3d213ecef74d37e988b971d8a",
                "md5": "277876e4a31a5730a99e0b598c534f9b",
                "sha256": "a14798c3005ec892bbada26485c2eea3b54109cb2533713e355c806891f63c5e"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "277876e4a31a5730a99e0b598c534f9b",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 122615,
            "upload_time": "2023-10-25T21:06:25",
            "upload_time_iso_8601": "2023-10-25T21:06:25.815914Z",
            "url": "https://files.pythonhosted.org/packages/80/f1/338d0050b24c3132bcfc79b68c3a5f54bce3d213ecef74d37e988b971d8a/pyrsistent-0.20.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "073ae56d6431b713518094fae6ff833a04a6f49ad0fbe25fb7c0dc7408e19d20",
                "md5": "36b0cbebe7d36e0f6e0a76a3dbb3b0f7",
                "sha256": "b14decb628fac50db5e02ee5a35a9c0772d20277824cfe845c8a8b717c15daa3"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "36b0cbebe7d36e0f6e0a76a3dbb3b0f7",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 122335,
            "upload_time": "2023-10-25T21:06:28",
            "upload_time_iso_8601": "2023-10-25T21:06:28.631343Z",
            "url": "https://files.pythonhosted.org/packages/07/3a/e56d6431b713518094fae6ff833a04a6f49ad0fbe25fb7c0dc7408e19d20/pyrsistent-0.20.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4abb5f40a4d5e985a43b43f607250e766cdec28904682c3505eb0bd343a4b7db",
                "md5": "651ed40c9dc9b2cdc508037ed254a6a3",
                "sha256": "2e2c116cc804d9b09ce9814d17df5edf1df0c624aba3b43bc1ad90411487036d"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "651ed40c9dc9b2cdc508037ed254a6a3",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 118510,
            "upload_time": "2023-10-25T21:06:30",
            "upload_time_iso_8601": "2023-10-25T21:06:30.718949Z",
            "url": "https://files.pythonhosted.org/packages/4a/bb/5f40a4d5e985a43b43f607250e766cdec28904682c3505eb0bd343a4b7db/pyrsistent-0.20.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c13e6a22f40f5800af116c02c28e29f15c06aa41cb2036f6a64ab124647f28b",
                "md5": "9fa499053198389ba13bc7281a63e8e3",
                "sha256": "e78d0c7c1e99a4a45c99143900ea0546025e41bb59ebc10182e947cf1ece9174"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp312-cp312-win32.whl",
            "has_sig": false,
            "md5_digest": "9fa499053198389ba13bc7281a63e8e3",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 60865,
            "upload_time": "2023-10-25T21:06:32",
            "upload_time_iso_8601": "2023-10-25T21:06:32.742553Z",
            "url": "https://files.pythonhosted.org/packages/1c/13/e6a22f40f5800af116c02c28e29f15c06aa41cb2036f6a64ab124647f28b/pyrsistent-0.20.0-cp312-cp312-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "75ef2fa3b55023ec07c22682c957808f9a41836da4cd006b5f55ec76bf0fbfa6",
                "md5": "7c73fdeda64b2febe84de7c3f020c9a1",
                "sha256": "4021a7f963d88ccd15b523787d18ed5e5269ce57aa4037146a2377ff607ae87d"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "7c73fdeda64b2febe84de7c3f020c9a1",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 63239,
            "upload_time": "2023-10-25T21:06:34",
            "upload_time_iso_8601": "2023-10-25T21:06:34.035389Z",
            "url": "https://files.pythonhosted.org/packages/75/ef/2fa3b55023ec07c22682c957808f9a41836da4cd006b5f55ec76bf0fbfa6/pyrsistent-0.20.0-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5243293a2b2bc4b4d645f2f6743e97b329c18dd9d8177f80e52d2b7911bac0f",
                "md5": "9615d39fb3b3538d0b2d27a870b215a0",
                "sha256": "79ed12ba79935adaac1664fd7e0e585a22caa539dfc9b7c7c6d5ebf91fb89054"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp38-cp38-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "9615d39fb3b3538d0b2d27a870b215a0",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 83450,
            "upload_time": "2023-10-25T21:06:35",
            "upload_time_iso_8601": "2023-10-25T21:06:35.707817Z",
            "url": "https://files.pythonhosted.org/packages/a5/24/3293a2b2bc4b4d645f2f6743e97b329c18dd9d8177f80e52d2b7911bac0f/pyrsistent-0.20.0-cp38-cp38-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5dea5438a78ba00f2a9cdc6836dcdcd8631b9d802b2bd57d5a61ed9d9ad6f24d",
                "md5": "92dc86461ed7a2ee1bb1665700c56490",
                "sha256": "f920385a11207dc372a028b3f1e1038bb244b3ec38d448e6d8e43c6b3ba20e98"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "92dc86461ed7a2ee1bb1665700c56490",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 121792,
            "upload_time": "2023-10-25T21:06:37",
            "upload_time_iso_8601": "2023-10-25T21:06:37.220424Z",
            "url": "https://files.pythonhosted.org/packages/5d/ea/5438a78ba00f2a9cdc6836dcdcd8631b9d802b2bd57d5a61ed9d9ad6f24d/pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b1ff93dea1abc3e2d44cee0f62974a1f133fc5a4c719c0978148726bd4957b52",
                "md5": "c58a641a659323e2c5e8c19ee010e3f8",
                "sha256": "4f5c2d012671b7391803263419e31b5c7c21e7c95c8760d7fc35602353dee714"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c58a641a659323e2c5e8c19ee010e3f8",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 121754,
            "upload_time": "2023-10-25T21:06:38",
            "upload_time_iso_8601": "2023-10-25T21:06:38.821963Z",
            "url": "https://files.pythonhosted.org/packages/b1/ff/93dea1abc3e2d44cee0f62974a1f133fc5a4c719c0978148726bd4957b52/pyrsistent-0.20.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "932993ad2089a3317b00c9f5d863a532339aa44dcd2cd5f8d73c569ef2c9cddb",
                "md5": "4f286eec216f0d6326db13f90a1d2bf1",
                "sha256": "ef3992833fbd686ee783590639f4b8343a57f1f75de8633749d984dc0eb16c86"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "4f286eec216f0d6326db13f90a1d2bf1",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 118326,
            "upload_time": "2023-10-25T21:06:40",
            "upload_time_iso_8601": "2023-10-25T21:06:40.473809Z",
            "url": "https://files.pythonhosted.org/packages/93/29/93ad2089a3317b00c9f5d863a532339aa44dcd2cd5f8d73c569ef2c9cddb/pyrsistent-0.20.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60c86ca4e647512d27b8a9ffe0daf75e284d1cb770c073d845d5893808a6951e",
                "md5": "6d3d32f662452e891a57be1e22d8bb66",
                "sha256": "881bbea27bbd32d37eb24dd320a5e745a2a5b092a17f6debc1349252fac85423"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp38-cp38-win32.whl",
            "has_sig": false,
            "md5_digest": "6d3d32f662452e891a57be1e22d8bb66",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 60841,
            "upload_time": "2023-10-25T21:06:42",
            "upload_time_iso_8601": "2023-10-25T21:06:42.756032Z",
            "url": "https://files.pythonhosted.org/packages/60/c8/6ca4e647512d27b8a9ffe0daf75e284d1cb770c073d845d5893808a6951e/pyrsistent-0.20.0-cp38-cp38-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "096a6a31c1bbffd4880a8825cea2572e8b3082681215464ebec9404c0b74ab4c",
                "md5": "3061acfca601bbc40a3a545e104823fc",
                "sha256": "6d270ec9dd33cdb13f4d62c95c1a5a50e6b7cdd86302b494217137f760495b9d"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "3061acfca601bbc40a3a545e104823fc",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 63281,
            "upload_time": "2023-10-25T21:06:44",
            "upload_time_iso_8601": "2023-10-25T21:06:44.445680Z",
            "url": "https://files.pythonhosted.org/packages/09/6a/6a31c1bbffd4880a8825cea2572e8b3082681215464ebec9404c0b74ab4c/pyrsistent-0.20.0-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "180c289126299fcebf54fd01d385fb5176c328fef2c4233139c23dd48346e992",
                "md5": "676d90dd204ad83786dbc4e019ce1a8e",
                "sha256": "ca52d1ceae015859d16aded12584c59eb3825f7b50c6cfd621d4231a6cc624ce"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp39-cp39-macosx_10_9_universal2.whl",
            "has_sig": false,
            "md5_digest": "676d90dd204ad83786dbc4e019ce1a8e",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 83379,
            "upload_time": "2023-10-25T21:06:45",
            "upload_time_iso_8601": "2023-10-25T21:06:45.585672Z",
            "url": "https://files.pythonhosted.org/packages/18/0c/289126299fcebf54fd01d385fb5176c328fef2c4233139c23dd48346e992/pyrsistent-0.20.0-cp39-cp39-macosx_10_9_universal2.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4e4562639d53ac09eaafc00f2e5845565e70d3eddb2d296337a77637186ca03e",
                "md5": "b729dde5dc2e9168a10fdaca7b156db5",
                "sha256": "b318ca24db0f0518630e8b6f3831e9cba78f099ed5c1d65ffe3e023003043ba0"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "b729dde5dc2e9168a10fdaca7b156db5",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 117740,
            "upload_time": "2023-10-25T21:06:46",
            "upload_time_iso_8601": "2023-10-25T21:06:46.918685Z",
            "url": "https://files.pythonhosted.org/packages/4e/45/62639d53ac09eaafc00f2e5845565e70d3eddb2d296337a77637186ca03e/pyrsistent-0.20.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab1224b9a6ef7b991b6722756e0aa169a39463af2b8ed0fb526f0a00aae34ea4",
                "md5": "7bc24036ee60525fd9b6b99c6fdd85b0",
                "sha256": "fed2c3216a605dc9a6ea50c7e84c82906e3684c4e80d2908208f662a6cbf9022"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "7bc24036ee60525fd9b6b99c6fdd85b0",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 117457,
            "upload_time": "2023-10-25T21:06:48",
            "upload_time_iso_8601": "2023-10-25T21:06:48.911244Z",
            "url": "https://files.pythonhosted.org/packages/ab/12/24b9a6ef7b991b6722756e0aa169a39463af2b8ed0fb526f0a00aae34ea4/pyrsistent-0.20.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "193cab06510f86bc0934b77ade41948924ff1f33dcd3433f32feca2028218837",
                "md5": "9a3b274ded79c8f166d6527dd2b47051",
                "sha256": "2e14c95c16211d166f59c6611533d0dacce2e25de0f76e4c140fde250997b3ca"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "9a3b274ded79c8f166d6527dd2b47051",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 114280,
            "upload_time": "2023-10-25T21:06:50",
            "upload_time_iso_8601": "2023-10-25T21:06:50.503163Z",
            "url": "https://files.pythonhosted.org/packages/19/3c/ab06510f86bc0934b77ade41948924ff1f33dcd3433f32feca2028218837/pyrsistent-0.20.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eeb11275bbfb929854d20e72aa2bbfb50ea3b1d7d41a95848b353691875e2817",
                "md5": "e42cebaacdf567bc6d6e4ad23a5bd084",
                "sha256": "f058a615031eea4ef94ead6456f5ec2026c19fb5bd6bfe86e9665c4158cf802f"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp39-cp39-win32.whl",
            "has_sig": false,
            "md5_digest": "e42cebaacdf567bc6d6e4ad23a5bd084",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 60764,
            "upload_time": "2023-10-25T21:06:52",
            "upload_time_iso_8601": "2023-10-25T21:06:52.093920Z",
            "url": "https://files.pythonhosted.org/packages/ee/b1/1275bbfb929854d20e72aa2bbfb50ea3b1d7d41a95848b353691875e2817/pyrsistent-0.20.0-cp39-cp39-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28770d7af973c0e3b1b83d8b45943601f77f85b943007e3a4d8744f7102c652b",
                "md5": "2614f75c6bf41501b048ad129ff8cd08",
                "sha256": "58b8f6366e152092194ae68fefe18b9f0b4f89227dfd86a07770c3d86097aebf"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "2614f75c6bf41501b048ad129ff8cd08",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 63289,
            "upload_time": "2023-10-25T21:06:53",
            "upload_time_iso_8601": "2023-10-25T21:06:53.221179Z",
            "url": "https://files.pythonhosted.org/packages/28/77/0d7af973c0e3b1b83d8b45943601f77f85b943007e3a4d8744f7102c652b/pyrsistent-0.20.0-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23880acd180010aaed4987c85700b7cc17f9505f3edb4e5873e4dc67f613e338",
                "md5": "2936d62f94b0e025bbdd11296c05b306",
                "sha256": "c55acc4733aad6560a7f5f818466631f07efc001fd023f34a6c203f8b6df0f0b"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2936d62f94b0e025bbdd11296c05b306",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 58106,
            "upload_time": "2023-10-25T21:06:54",
            "upload_time_iso_8601": "2023-10-25T21:06:54.387588Z",
            "url": "https://files.pythonhosted.org/packages/23/88/0acd180010aaed4987c85700b7cc17f9505f3edb4e5873e4dc67f613e338/pyrsistent-0.20.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ce3a5031723c09068e9c8c2f0bc25c3a9245f2b1d1aea8396c787a408f2b95ca",
                "md5": "dce0f9a13668dbf8bb76f74954b4a42a",
                "sha256": "4c48f78f62ab596c679086084d0dd13254ae4f3d6c72a83ffdf5ebdef8f265a4"
            },
            "downloads": -1,
            "filename": "pyrsistent-0.20.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dce0f9a13668dbf8bb76f74954b4a42a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 103642,
            "upload_time": "2023-10-25T21:06:56",
            "upload_time_iso_8601": "2023-10-25T21:06:56.342016Z",
            "url": "https://files.pythonhosted.org/packages/ce/3a/5031723c09068e9c8c2f0bc25c3a9245f2b1d1aea8396c787a408f2b95ca/pyrsistent-0.20.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-25 21:06:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tobgu",
    "github_project": "pyrsistent",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "pyrsistent"
}
        
Elapsed time: 0.15235s