### Install multidict Package Source: https://multidict.aio-libs.org Standard command to install the multidict library using pip. Ensure you have pip installed. ```bash $ pip install multidict ``` -------------------------------- ### Install multidict without C Extensions Source: https://multidict.aio-libs.org Command to install multidict while disabling C extensions, useful for environments where compilation is not possible or desired. This will result in a significantly slower pure Python version. ```bash $ MULTIDICT_NO_EXTENSIONS=1 pip install multidict ``` -------------------------------- ### Version Information Source: https://multidict.aio-libs.org Provides information on how to get the version of the multidict library. ```APIDOC ## Version Information ### `getversion()` Returns the version of the multidict library. ``` -------------------------------- ### MultiDictProxy Methods Source: https://multidict.aio-libs.org Provides documentation for the methods available on the MultiDictProxy class. ```APIDOC ## MultiDictProxy Methods ### `MultiDictProxy.len()` Returns the number of items in the MultiDictProxy. ### `MultiDictProxy.d()` Returns a dictionary representation of the MultiDictProxy. ### `MultiDictProxy.iter()` Returns an iterator over the items in the MultiDictProxy. ### `MultiDictProxy.copy()` Returns a shallow copy of the MultiDictProxy. ### `MultiDictProxy.getone(key, default=None)` Returns the first value associated with the key, or the default value if the key is not found. ### `MultiDictProxy.getall(key, default=[])` Returns a list of all values associated with the key, or the default value if the key is not found. ### `MultiDictProxy.get(key, default=None)` Returns the first value associated with the key, or the default value if the key is not found. This is an alias for `getone`. ### `MultiDictProxy.keys()` Returns a list of all keys in the MultiDictProxy. ### `MultiDictProxy.items()` Returns a list of all key-value pairs in the MultiDictProxy. ### `MultiDictProxy.values()` Returns a list of all values in the MultiDictProxy. ``` -------------------------------- ### MultiDict Methods Source: https://multidict.aio-libs.org Provides documentation for the methods available on the MultiDict class. ```APIDOC ## MultiDict Methods ### `MultiDict.len()` Returns the number of items in the MultiDict. ### `MultiDict.d()` Returns a dictionary representation of the MultiDict. ### `MultiDict.iter()` Returns an iterator over the items in the MultiDict. ### `MultiDict.add(key, value)` Adds a key-value pair to the MultiDict. If the key already exists, the new value is appended. ### `MultiDict.clear()` Removes all items from the MultiDict. ### `MultiDict.copy()` Returns a shallow copy of the MultiDict. ### `MultiDict.getone(key, default=None)` Returns the first value associated with the key, or the default value if the key is not found. ### `MultiDict.getall(key, default=[])` Returns a list of all values associated with the key, or the default value if the key is not found. ### `MultiDict.get(key, default=None)` Returns the first value associated with the key, or the default value if the key is not found. This is an alias for `getone`. ### `MultiDict.keys()` Returns a list of all keys in the MultiDict. ### `MultiDict.items()` Returns a list of all key-value pairs in the MultiDict. ### `MultiDict.values()` Returns a list of all values in the MultiDict. ### `MultiDict.popone(key, default=None)` Removes and returns the first value associated with the key. Raises KeyError if the key is not found and no default is provided. ### `MultiDict.pop(key, default=None)` Removes and returns the first value associated with the key. Raises KeyError if the key is not found and no default is provided. This is an alias for `popone`. ### `MultiDict.popall(key, default=[])` Removes and returns all values associated with the key. Raises KeyError if the key is not found and no default is provided. ### `MultiDict.popitem()` Removes and returns an arbitrary key-value pair from the MultiDict. ### `MultiDict.setdefault(key, default=None)` Returns the value for key if key is in the dictionary, else default. If key is not in the dictionary, it is inserted with default. ### `MultiDict.extend(other)` Extends the MultiDict with key-value pairs from another iterable or mapping. Existing keys will have new values appended. ### `MultiDict.merge(other)` Merges another MultiDict or mapping into this one. If a key exists in both, the values from `other` will overwrite the values in this MultiDict. ### `MultiDict.update(other)` Updates the MultiDict with key-value pairs from another iterable or mapping. If a key exists in both, the values from `other` will overwrite the values in this MultiDict. This is an alias for `merge`. ``` -------------------------------- ### Case-Insensitive Key Access in CIMultiDict Source: https://multidict.aio-libs.org Demonstrates how CIMultiDict treats keys case-insensitively. Useful for scenarios where key casing might vary. ```python >>> dct = CIMultiDict(key='val') >>> 'Key' in dct True >>> dct['Key'] 'val' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.