{"id":24038,"library":"mitmproxy-macos","title":"mitmproxy-macos","description":"Native macOS TLS support for mitmproxy (mitmproxy-rs). This library provides the low-level TLS API for mitmproxy on macOS, leveraging Apple's Security Framework. Version 0.12.9 is the latest, with monthly releases. Compatible with Python >=3.12.","status":"active","version":"0.12.9","language":"python","source_language":"en","source_url":"https://github.com/mitmproxy/mitmproxy-rs","tags":["mitmproxy","macos","tls","network","proxy"],"install":[{"cmd":"pip install mitmproxy-macos","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"mitmproxy-macos is a dependency of mitmproxy; typically installed automatically as part of mitmproxy.","package":"mitmproxy","optional":false},{"reason":"Required for TLS operations; installed as a transitive dependency.","package":"cryptography","optional":false}],"imports":[{"note":"TLS is a generic name; correct class is TLSLayer.","wrong":"from mitmproxy_macos import TLS","symbol":"TLSLayer","correct":"from mitmproxy_macos import TLSLayer"}],"quickstart":{"code":"import os\nfrom mitmproxy_macos import TLSLayer\n\n# The library is meant to be used as part of mitmproxy.\n# Below is a snippet to verify the import works.\ntls_layer = TLSLayer()\nprint('TLSLayer initialized successfully')\n","lang":"python","description":"Verify import and basic instantiation of TLSLayer."},"warnings":[{"fix":"Upgrade Python to 3.12 or later.","message":"Requires Python >=3.12; not compatible with earlier versions.","severity":"breaking","affected_versions":"<0.12.0"},{"fix":"Replace `from mitmproxy_macos.tls import TLSLayer` with `from mitmproxy_macos import TLSLayer`.","message":"The module `mitmproxy_macos.tls` was deprecated in 0.12.5; use `mitmproxy_macos.TLSLayer` instead.","severity":"deprecated","affected_versions":">=0.12.5, <0.13.0"},{"fix":"Use conditional import or run only on macOS.","message":"Library only works on macOS; importing on other platforms raises an ImportError.","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 using pip: `pip install mitmproxy-macos` (note the hyphen in the package name, but import uses underscore).","cause":"The package was not installed or installed with an older name (e.g., `mitmproxy-macos` with hyphen).","error":"ModuleNotFoundError: No module named 'mitmproxy_macos'"},{"fix":"Use `from mitmproxy_macos import TLSLayer` instead.","cause":"TLS is not a public symbol; the correct class is TLSLayer.","error":"ImportError: cannot import name 'TLS' from 'mitmproxy_macos'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}