{"library":"pyobjc-framework-coremotion","title":"PyObjC CoreMotion Framework","description":"PyObjC is a bridge between Python and Objective-C, enabling Python developers to write macOS applications and scripts using Apple's high-level system APIs. The `pyobjc-framework-coremotion` package provides Python wrappers for the CoreMotion framework on macOS, allowing access to device motion and environment-related data. The library is currently at version 12.1 and typically releases new major versions aligned with macOS SDK updates, usually around October/November, with minor bugfix releases as needed.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-coremotion"],"cli":null},"imports":["import CoreMotion","from CoreMotion import CMMotionManager"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import CoreMotion\nfrom Foundation import NSObject # Foundation is part of pyobjc-framework-Cocoa, which is usually installed with pyobjc\n\n# A simple check to ensure the CoreMotion framework is available and a class is accessible.\n# Actual use of CMMotionManager to get data would require an active NSApplication/NSRunLoop\n# and appropriate user permissions on macOS.\n\nprint(f\"CoreMotion module: {CoreMotion.__name__}\")\n\nif hasattr(CoreMotion, 'CMMotionManager'):\n    print(f\"CMMotionManager class found: {CoreMotion.CMMotionManager}\")\n    # Example: Attempting to instantiate CMMotionManager (requires an app context on macOS)\n    # manager = CoreMotion.CMMotionManager.alloc().init()\n    # print(f\"CMMotionManager instance created: {manager}\")\nelse:\n    print(\"CMMotionManager class not found. Ensure correct macOS version and PyObjC installation.\")\n","lang":"python","description":"This quickstart demonstrates how to import the `CoreMotion` framework and access a common class like `CMMotionManager`. While actual motion data retrieval requires a running macOS application context and user permissions, this code verifies that the framework is correctly imported and its classes are accessible in Python.","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-coremotion","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-coremotion","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-coremotion","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-coremotion","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-coremotion","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-coremotion","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-coremotion","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-coremotion","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.4,"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-coremotion","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-coremotion","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}]}}