{"library":"pyobjc-framework-corespotlight","title":"PyObjC CoreSpotlight Framework Bindings","description":"PyObjC is a bridge between Python and Objective-C, enabling Python scripts to use and extend existing Objective-C class libraries, most importantly the Cocoa frameworks by Apple. The `pyobjc-framework-corespotlight` package provides Python bindings for the CoreSpotlight framework, allowing Python applications to interact with macOS Spotlight indexing capabilities. The current version is 12.1, with a regular release cadence often aligning with new macOS SDKs and Python versions.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pyobjc-framework-corespotlight","pip install pyobjc"],"cli":null},"imports":["import CoreSpotlight","from CoreSpotlight import CSSearchableItem","from CoreSpotlight import CSSearchableItemAttributeSet"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import CoreSpotlight\nfrom Foundation import NSDate\n\ndef index_item(item_id, title, description):\n    # Create an attribute set for the item\n    attribute_set = CoreSpotlight.CSSearchableItemAttributeSet.alloc().initWithItemContentType_('public.text')\n    attribute_set.setTitle_(title)\n    attribute_set.setContentDescription_(description)\n    attribute_set.setKeywords_(['pyobjc', 'spotlight', 'example'])\n    attribute_set.setCreationDate_(NSDate.date())\n\n    # Create the searchable item\n    searchable_item = CoreSpotlight.CSSearchableItem.alloc().initWithUniqueIdentifier_domainIdentifier_attributeSet_(\n        item_id, 'com.example.app.domain', attribute_set\n    )\n\n    # Index the item\n    CoreSpotlight.CSSearchableIndex.defaultSearchableIndex().indexSearchableItems_completionHandler_(\n        [searchable_item], None\n    )\n    print(f\"Indexed item: {title} (ID: {item_id})\")\n\nif __name__ == '__main__':\n    # Example usage\n    index_item(\"my-unique-id-1\", \"My First PyObjC Spotlight Item\", \"This is a test item indexed via PyObjC CoreSpotlight.\")\n    index_item(\"my-unique-id-2\", \"Another Spotlight Entry\", \"This showcases indexing another piece of content.\")","lang":"python","description":"This quickstart demonstrates how to index content using the CoreSpotlight framework through PyObjC. It creates two `CSSearchableItem` instances with basic attributes and adds them to the default Spotlight index.","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","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-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyobjc-framework-corespotlight","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","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.1,"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-corespotlight","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.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyobjc","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-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyobjc-framework-corespotlight","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","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.3,"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-corespotlight","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","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-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyobjc-framework-corespotlight","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","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":1.4,"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-corespotlight","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.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyobjc","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-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyobjc-framework-corespotlight","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","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":2.7,"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-corespotlight","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","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-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyobjc-framework-corespotlight","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","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.7,"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-corespotlight","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":3.6,"import_time_s":null,"mem_mb":null,"disk_size":null}]}}