{"id":21598,"library":"multimapping","title":"MultiMapping","description":"Special MultiMapping objects used in Zope, currently at version 5.1. Provides ordered and unordered mappings supporting multiple values per key (like `NestedMultiMapping` and `IOrderedMultiMapping`). Release cadence is low, with occasional maintenance updates. Requires Python >=3.10.","status":"active","version":"5.1","language":"python","source_language":"en","source_url":"https://github.com/zopefoundation/MultiMapping","tags":["mapping","zope","multiple-values","ordered"],"install":[{"cmd":"pip install multimapping","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from multimapping import MultiMapping","symbol":"MultiMapping","correct":"from MultiMapping import MultiMapping"},{"symbol":"Base","correct":"from MultiMapping import Base"},{"symbol":"pyMultiMapping","correct":"from MultiMapping import pyMultiMapping"}],"quickstart":{"code":"from multimapping import MultiMapping, NestedMultiMapping\n# Create a simple MultiMapping\nmm = MultiMapping()\nmm['key1'] = 'value1'\nmm.add('key1', 'value2')\nprint(mm.getall('key1'))  # ['value1', 'value2']\n# NestedMultiMapping stores keys as ordered tuples\nnmm = NestedMultiMapping()\nnmm[('a', 'b')] = 1\nprint(nmm[('a', 'b')])  # 1","lang":"python","description":"Basic usage: create MultiMapping and NestedMultiMapping, add multiple values per key."},"warnings":[{"fix":"Replace 'from zope.multimapping import ...' with 'from multimapping import ...'","message":"In version 5.0, the package was renamed from 'zope.multimapping' to just 'multimapping'. All imports must be updated.","severity":"breaking","affected_versions":">=5.0"},{"fix":"Use 'IMultiMapping' from 'multimapping.interfaces'","message":"The 'IUnorderedMultiMapping' interface is deprecated and will be removed in a future version. Use 'IMultiMapping' instead.","severity":"deprecated","affected_versions":">=5.0"},{"fix":"If you need an immutable sequence, convert the result to tuple: tuple(mm.getall('key1'))","message":"Methods like 'getall' return a list, not a tuple. Relying on immutability can break code.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'3.10':36 '5.1':11 'cadenc':27 'current':8 'iorderedmultimap':25 'key':21 'like':22 'low':29 'mainten':32 'map':16,37 'multimap':1,3 'multipl':18,40 'multiple-valu':39 'nestedmultimap':23 'object':4 'occasion':31 'order':13,42 'per':20 'provid':12 'python':35 'releas':26 'requir':34 'special':2 'support':17 'unord':15 'updat':33 'use':5 'valu':19,41 'version':10 'zope':7,38","created_at":"2026-04-27T17:00:44.907563+00:00","updated_at":"2026-04-27T17:00:44.907563+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"5.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/zopefoundation/MultiMapping","docs":null,"changelog":"https://github.com/zopefoundation/MultiMapping/blob/master/CHANGES.txt","pypi":"https://pypi.org/project/multimapping/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}