{"library":"pyobjc-framework-systemconfiguration","title":"PyObjC SystemConfiguration Framework","description":"PyObjC provides Python bindings for macOS frameworks. This specific package wraps the SystemConfiguration.framework, allowing Python applications to interact with system network settings, reachability, and other system configuration details. It is actively developed, with version 12.1 being the current stable release, and follows a release cadence tied to macOS SDK updates and Python version support.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-systemconfiguration"],"cli":null},"imports":["import SystemConfiguration","from SystemConfiguration import SCDynamicStore"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import SystemConfiguration\nimport socket\n\ndef is_network_reachable():\n    # Check if network is generally reachable (e.g., Wi-Fi or Ethernet connected)\n    # This is a basic check and doesn't verify internet access.\n\n    # Create a socket address for 0.0.0.0 (any address)\n    zero_address = ('0.0.0.0', 0)\n    target_address = SystemConfiguration.SCNetworkReachabilityCreateWithName(None, zero_address[0])\n\n    if not target_address:\n        print(\"Failed to create reachability reference.\")\n        return False\n\n    # Get the reachability flags\n    # The 'flags' variable will be an NSInteger, which behaves like a Python int\n    is_reachable, flags = SystemConfiguration.SCNetworkReachabilityGetFlags(target_address, None)\n\n    if not is_reachable:\n        return False\n\n    # Define common reachability flags\n    kSCNetworkReachabilityFlagsReachable = 1 << 1 # Network is reachable\n    kSCNetworkReachabilityFlagsConnectionRequired = 1 << 2 # Connection must be established first\n    kSCNetworkReachabilityFlagsTransientConnection = 1 << 3 # Connection will go away, use only for setup\n    kSCNetworkReachabilityFlagsIsWWAN = 1 << 17 # Connection is a WWAN connection\n    kSCNetworkReachabilityFlagsIsDirect = 1 << 4 # Direct connection to the target host\n\n    # Check if the 'Reachable' flag is set and 'ConnectionRequired' is not set\n    if (flags & kSCNetworkReachabilityFlagsReachable) and \\\n       not (flags & kSCNetworkReachabilityFlagsConnectionRequired):\n        return True\n    return False\n\nif __name__ == '__main__':\n    if is_network_reachable():\n        print(\"Network is reachable.\")\n    else:\n        print(\"Network is not reachable (or requires connection).\")","lang":"python","description":"This quickstart demonstrates how to use `SystemConfiguration` to check if the network is generally reachable. It uses `SCNetworkReachabilityCreateWithName` and `SCNetworkReachabilityGetFlags` to query the system's network status. Note that this check primarily indicates local network connectivity, not necessarily internet access. For full functionality, you would often interact with `SCDynamicStore` for more detailed network state.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":null,"pypi_latest":"12.1","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":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","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":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.9,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","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":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","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":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.9,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","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":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.5,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","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":"pyobjc-framework-systemconfiguration","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.5,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}