skillfed

itypes

Simple immutable types for python.

itypes v1.2.0 1.7M downloads/30d#3,676 on PyPI19
Permissive license BSD Abandoned released

What it is and what it does

itypes provides immutable versions of Python's dict and list that prevent accidental modification and automatically convert nested mutable structures to immutable equivalents. When you call methods like `set()` or `delete()`, they return new copies rather than modifying in place; direct assignment or deletion raises a TypeError. The package also supports nested lookups and updates via `get_in()`, `set_in()`, and `delete_in()` methods, and objects are hashable so they can be used as dictionary keys or in sets.

The library is designed for simplicity and code clarity rather than performance—it trades speed for readability in scenarios where immutability helps prevent bugs or makes intent clearer. You can subclass `itypes.Dict` or `itypes.Object` to create custom immutable types with restricted interfaces, using private attributes and `@property` decorators for controlled access.

Use it for:

  • Store configuration data that should not be accidentally modified during program execution
  • Use immutable dicts as dictionary keys or in sets where hashability is required
  • Create custom immutable domain objects by subclassing itypes.Object with property-based access
  • Enforce immutability in nested data structures where both top-level and inner collections must be read-only
  • Simplify reasoning about data flow in codebases where immutability prevents side effects

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides immutable container types (Dict and List) for Python that prevent modification after creation and automatically coerce nested structures to immutable equivalents.

No. The package is abandoned (last commit 2020-04-19, repository archived) with no active maintenance or security updates. While it has low install friction and permissive licensing, the lack of maintenance means it will not receive bug fixes or compatibility updates for modern Python versions. For immutable containers, consider actively maintained alternatives.

Install

itypes on PyPI

pip

pip install itypes

uv

uv add itypes

poetry

poetry add itypes

Installing itypes

Before you install

Installation is straightforward with no runtime dependencies. However, the package is abandoned—last updated in April 2020, over 2308 days ago, with the repository archived. No active maintenance or security updates are being provided.

License in practice

Licensed under BSD (permissive), which allows use in most projects without restriction. No notable licensing constraints for adoption.

Quickstart

pip install itypes

import itypes
d = itypes.Dict({'a': 1, 'b': 2})
l = itypes.List(['x', 'y', 'z'])
d2 = d.set('c', 3)  # returns new Dict, original unchanged

Verify before relying

  • Whether the package works reliably on Python versions released after 2020
  • Whether nested immutability coercion handles all edge cases in modern Python
  • Performance characteristics compared to alternatives for large data structures

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,308 days since the last release
Last repo commit (repository archived)
First released
Downloads 1,659,324/month — #3,676 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: itypes-1.2.0-py2.py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Internet :: WWW/HTTP

Tags

immutable dict and listimmutable containers pythonfrozen data structuresimmutable types libraryhashable dict and listread-only collectionsimmutable nested structures
immutable-dataabandoned

More WWW/HTTP packages