{"library":"mypy-extensions","title":"Mypy Extensions","description":"mypy-extensions provides specific type system extensions for programs checked with the mypy type checker and the mypyc compiler. It acts as a bridge for experimental or mypy-specific typing features that may eventually be standardized in Python's `typing` module or `typing_extensions`, but are supported early by mypy. The library follows mypy's active development and releases are tied to mypy's needs, which typically sees multiple releases per month for the main mypy project.","language":"python","status":"active","last_verified":"Tue May 12","install":{"commands":["pip install mypy-extensions"],"cli":null},"imports":["from mypy_extensions import override","from mypy_extensions import Required","from mypy_extensions import NotRequired"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from mypy_extensions import override\nfrom typing import Dict, Any, List\n\nclass BaseAnalyzer:\n    def analyze(self, data: Dict[str, Any]) -> List[str]:\n        raise NotImplementedError\n\nclass SpecificAnalyzer(BaseAnalyzer):\n    @override\n    def analyze(self, data: Dict[str, Any]) -> List[str]:\n        if \"items\" in data:\n            return [str(item) for item in data[\"items\"]]\n        return []\n\n# Example usage for mypy checking\ndef process_data(analyzer: BaseAnalyzer, input_data: Dict[str, Any]) -> List[str]:\n    return analyzer.analyze(input_data)\n\nif __name__ == \"__main__\":\n    analyzer_instance = SpecificAnalyzer()\n    results = process_data(analyzer_instance, {\"items\": [1, \"two\", 3.0]})\n    print(f\"Analysis results: {results}\")\n\n# To type-check this file:\n# mypy your_file_name.py","lang":"python","description":"This quickstart demonstrates the use of the `override` decorator from `mypy_extensions`. Run `mypy your_file_name.py` to type-check this example. If `SpecificAnalyzer.analyze` did not correctly override `BaseAnalyzer.analyze`, mypy would report an error. Note that for Python 3.12+, `typing.override` should generally be preferred if `mypy-extensions` is not otherwise needed. The core functionality of `mypy-extensions` is to provide types for mypy to check, not to execute specific runtime logic itself.","tag":"stale","tag_description":"widespread failures or data too old to trust","last_tested":"2026-04-23","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]},"compatibility":{"tag":"stale","tag_description":"widespread failures or data too old to trust","last_tested":"2026-05-12","installed_version":null,"pypi_latest":null,"is_stale":null,"summary":{"python_range":"3.10–3.9","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mypy-extensions","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}