{"library":"pyobjc-framework-screensaver","title":"PyObjC Framework ScreenSaver","description":"PyObjC Framework ScreenSaver provides Python bindings and wrappers for the macOS ScreenSaver.framework, enabling Python developers to interact with and create macOS screensavers. It is part of the larger PyObjC project, which offers comprehensive bridges to Objective-C frameworks. The current version is 12.1 and its release cadence is tied to updates in the macOS SDK and Python version support by the core PyObjC project.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-screensaver"],"cli":null},"imports":["import ScreenSaver"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import ScreenSaver\nimport objc\nfrom Foundation import NSMakeRect, NSObject # Needed for basic Cocoa types\n\n# Get a reference to the SSScreenSaverView class\nSSScreenSaverView = ScreenSaver.SSScreenSaverView\n\nprint(f\"Successfully imported ScreenSaver.SSScreenSaverView: {SSScreenSaverView}\")\nprint(f\"Is SSScreenSaverView an Objective-C class? {objc.is_objc_class(SSScreenSaverView)}\")\n\n# To demonstrate basic instantiation (requires Cocoa types like NSRect)\n# Note: A functional screensaver requires proper macOS application context.\ntry:\n    dummy_frame = NSMakeRect(0, 0, 100, 100)\n    # Instantiate an SSScreenSaverView; this will create the Objective-C object.\n    # It won't be visible or functional without being added to a view hierarchy.\n    saver_view = SSScreenSaverView.alloc().initWithFrame_isPreview_(dummy_frame, False)\n    print(f\"Created a dummy SSScreenSaverView instance: {saver_view}\")\n    # In a real screensaver, you would subclass SSScreenSaverView and override\n    # methods like 'drawRect_' or 'animateOneFrame'.\nexcept Exception as e:\n    print(f\"Could not fully instantiate SSScreenSaverView in this context: {e}\")\n","lang":"python","description":"This quickstart demonstrates how to import the ScreenSaver framework and access a core class like `SSScreenSaverView`. While it shows basic instantiation, developing a functional screensaver requires subclassing `SSScreenSaverView` and integrating within a proper macOS screensaver project structure.","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-screensaver","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-screensaver","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-screensaver","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-screensaver","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.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyobjc-framework-screensaver","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-screensaver","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-screensaver","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-screensaver","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-screensaver","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-screensaver","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.4,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}