A list-like structure which implements

The list is mutable until freeze() is called, after which list modifications raise RuntimeError. A FrozenList instance is hashable, but only when frozen. Attempts to hash a non-frozen instance will result in a RuntimeError exception.


class frozenlist.FrozenList(items)

Construct a new non-frozen list from items iterable.

The list implements all methods plus two additional APIs.


A read-only property, True is the list is frozen (modifications are forbidden).


Freeze the list. There is no way to thaw it back.


$ pip install frozenlist

The library requires Python 3.8 or newer.


Communication channels

We have a Matrix Space which is also accessible via Gitter.


  • Python >= 3.8


frozenlist is offered under the Apache 2 license.

Source code

The project is hosted on GitHub

Please file an issue in the bug tracker if you have found a bug or have some suggestions to improve the library.

Authors and License

The frozenlist package was originally part of the aiohttp project, written by Nikolay Kim and Andrew Svetlov. It is now being maintained by Martijn Pieters.

It’s Apache 2 licensed and freely available.

Feel free to improve this package and send a pull request to GitHub.

Indices and tables