{"id":6070,"library":"pyobjc-framework-automaticassessmentconfiguration","title":"PyObjC: Automatic Assessment Configuration Framework","description":"Wrappers for the `AutomaticAssessmentConfiguration` framework on macOS, enabling Python applications to interact with Apple's API for creating secure assessment sessions. This library is part of the larger PyObjC project, currently at version 12.1, and receives regular updates to align with macOS SDK changes.","status":"active","version":"12.1","language":"en","source_language":"en","source_url":"https://github.com/ronaldoussoren/pyobjc","tags":["python","macos","objective-c","cocoa","framework","apple","assessment","education","security"],"install":[{"cmd":"pip install pyobjc-framework-automaticassessmentconfiguration","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"This package provides the core bridge functionality between Python and Objective-C, essential for all PyObjC framework wrappers.","package":"pyobjc-core"}],"imports":[{"note":"PyObjC maps macOS frameworks directly to Python modules.","symbol":"AutomaticAssessmentConfiguration","correct":"import AutomaticAssessmentConfiguration"},{"note":"AEAssessmentSession is the primary class for managing assessment sessions according to Apple's documentation.","symbol":"AEAssessmentSession","correct":"from AutomaticAssessmentConfiguration import AEAssessmentSession"}],"quickstart":{"code":"import AutomaticAssessmentConfiguration\nimport objc\n\n# The AutomaticAssessmentConfiguration framework is available from macOS 10.15.4.\n# The main class is AEAssessmentSession. To use it, your app MUST have the\n# 'com.apple.developer.automatic-assessment-configuration' entitlement.\n\nprint(f\"PyObjC framework version: {AutomaticAssessmentConfiguration.__version__}\")\n\nif hasattr(AutomaticAssessmentConfiguration, 'AEAssessmentSession') and AutomaticAssessmentConfiguration.AEAssessmentSession is not objc.nil:\n    print(\"AutomaticAssessmentConfiguration.AEAssessmentSession class is available.\")\n    # Example (requires entitlement and proper app lifecycle):\n    # session = AutomaticAssessmentConfiguration.AEAssessmentSession.alloc().init()\n    # # ... configure and begin session ...\n    # session.beginAssessmentSessionWithConfiguration_completionHandler_(None, lambda error: print(f'Session begin error: {error}'))\n    # # ... perform assessment ...\n    # session.endAssessmentSessionWithCompletionHandler_(lambda error: print(f'Session end error: {error}'))\nelse:\n    print(\"AutomaticAssessmentConfiguration.AEAssessmentSession class is not found or framework not loaded.\")\n","lang":"python","description":"This quickstart demonstrates how to import the `AutomaticAssessmentConfiguration` framework and check for the availability of its core class, `AEAssessmentSession`. Actual usage of the framework, such as starting and ending assessment sessions, requires specific entitlements from Apple and adherence to a proper macOS application lifecycle."},"warnings":[{"fix":"Upgrade to Python 3.10 or a later supported version. The latest PyObjC version (12.1) requires Python >=3.10.","message":"PyObjC v12.0 dropped support for Python 3.9, and v11.0 dropped support for Python 3.8. Ensure your Python environment is 3.10 or newer.","severity":"breaking","affected_versions":">=11.0"},{"fix":"Review PyObjC's documentation on memory management and ARC, specifically for `init` methods, and adapt your code to the updated reference counting semantics. You might need to adjust how objects created with `init` methods are retained/released in Python.","message":"PyObjC v11.1 introduced changes to how `init` family methods handle references, aligning with `clang`'s Automatic Reference Counting (ARC) documentation. Code relying on previous PyObjC reference counting behavior for Objective-C initializer methods might experience issues.","severity":"breaking","affected_versions":">=11.1"},{"fix":"Obtain the necessary entitlement from Apple and configure your application's Xcode project to include it in the app's Info.plist and code signing entitlements.","message":"Using the `AutomaticAssessmentConfiguration` framework requires your macOS application to have the `com.apple.developer.automatic-assessment-configuration` entitlement. Without this, attempts to use the framework will fail at runtime.","severity":"gotcha","affected_versions":"All"},{"fix":"If subclassing Objective-C classes, be mindful of defining both `__new__` and `__init__`. If you define `__new__`, `__init__` will be called. If you rely on PyObjC's default `__new__`, then `__init__` should be handled carefully as per PyObjC's specific rules for that scenario.","message":"Interactions between `__init__` and `__new__` when subclassing Objective-C classes can be tricky. PyObjC v10.3 initially removed `__init__` support when PyObjC's `__new__` was used, but v10.3.1 reintroduced `__init__` support when the user provides their own `__new__`.","severity":"gotcha","affected_versions":">=10.3"},{"fix":"Update calls to `encodeBytes_length_forKey_` to use the modern three-argument signature, aligning with standard PyObjC Objective-C API binding patterns.","message":"The older interface for `NSCoder.encodeBytes_length_forKey_` (used in `pyobjc-core` and potentially other frameworks) is deprecated in PyObjC 12 and will be removed in PyObjC 13. Ensure you are using the new three-argument interface if interacting with `NSCoder`.","severity":"deprecated","affected_versions":">=12.0 (deprecated in)"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}