{"id":24768,"library":"types-frozendict","title":"types-frozendict","description":"Typing stubs for the frozendict library, providing type hints for frozen dictionaries. Currently version 2.0.9, maintained as part of the typeshed project with updates aligned to Python and frozendict releases.","status":"active","version":"2.0.9","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["stubs","type-hints","frozendict","typeshed"],"install":[{"cmd":"pip install types-frozendict","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"frozendict is a class, not a module; correct import is from the package","wrong":"import frozendict","symbol":"frozendict","correct":"from frozendict import frozendict"}],"quickstart":{"code":"from frozendict import frozendict\n\n# Create a frozen dict\nfd = frozendict({\"key\": \"value\"})\nprint(fd[\"key\"])  # Output: value\n\n# Type hint example\ndef process(d: frozendict[str, int]) -> None:\n    for k, v in d.items():\n        print(k, v)\n\nprocess(frozendict({\"a\": 1, \"b\": 2}))\n","lang":"python","description":"Basic usage of frozendict and type hints provided by types-frozendict."},"warnings":[{"fix":"Monitor frozendict releases; if inline types are added, remove types-frozendict dependency and use frozendict directly.","message":"types-frozendict is part of typeshed and may be deprecated in favor of inline types if the frozendict project adds its own types.","severity":"deprecated","affected_versions":"2.0.x"},{"fix":"Add custom type stubs if using advanced features not covered by types-frozendict.","message":"The stubs only cover frozendict's public API. Custom subclasses or advanced features may not be typed.","severity":"gotcha","affected_versions":"all"},{"fix":"Use mypy or pyright with custom checks if needed, or ensure values are hashable at runtime.","message":"frozendict is hashable only if all its values are hashable. The stubs do not enforce this at type-check time.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install frozendict: pip install frozendict","cause":"The frozendict package is not installed; types-frozendict only provides type stubs.","error":"ImportError: cannot import name 'frozendict' from 'frozendict' (unknown location)"},{"fix":"Install frozendict: pip install frozendict; optionally install types-frozendict for type hints.","cause":"Neither frozendict nor types-frozendict are installed.","error":"ModuleNotFoundError: No module named 'frozendict'"},{"fix":"Install types-frozendict: pip install types-frozendict","cause":"Missing types-frozendict type stubs; the module exists but mypy can't find stubs.","error":"Cannot find implementation or library stub for module 'frozendict'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}