{"library":"pyimg4","title":"PyIMG4","description":"PyIMG4 is a Python library and CLI tool designed for parsing, manipulating, and creating Apple's proprietary Image4 format, including IMG4, IM4M (manifest), and IM4P (payload) files. It is currently at version 0.8.8 and maintains a relatively active release cadence, with updates addressing bugs, adding features, and refining internal logic.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install pyimg4"],"cli":{"name":"pyimg4","version":"PyIMG4 0.8.8"}},"imports":["from pyimg4 import IMG4","from pyimg4 import IM4M","from pyimg4 import IM4P"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pyimg4 import IMG4\n\n# Example: Extracting IM4P payload from an IMG4 file\ntry:\n    # Simulate reading an IMG4 file (replace 'path/to/myfile.img4' with actual path)\n    # For demonstration, we create a dummy file. In a real scenario, this would be `open('myfile.img4', 'rb')`\n    dummy_img4_data = b'IMG4\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00IM4P\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00ABCD\\x00\\x00\\x00\\x08\\x00\\x00\\x00\\x00IM4M\\x00\\x00\\x00\\x01\\x00\\x00\\x00\\x00MNFT\\x00\\x00\\x00\\x04DATA'\n    \n    # Open the IMG4 file (or use dummy data as shown)\n    i = IMG4(dummy_img4_data)\n\n    print(\"IMG4 file content:\")\n    i.show() # Display the structure of the IMG4 object\n\n    # Extract and print the IM4P payload data\n    if i.IM4P and i.IM4P.DATA:\n        print(\"\\nExtracted IM4P Payload Data (first 100 bytes):\")\n        print(i.IM4P.DATA[:100])\n    else:\n        print(\"No IM4P payload data found.\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to parse an Image4 file, display its contents, and extract the IM4P payload data using PyIMG4. It simulates reading a dummy Image4 file for immediate execution.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"0.8.8","pypi_latest":"0.8.8","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":80,"avg_install_s":2.6,"avg_import_s":0.15,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pyimg4","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.13,"mem_mb":4.7,"disk_size":"28.1M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pyimg4","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.5,"import_time_s":0.11,"mem_mb":4.7,"disk_size":"29M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pyimg4","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.18,"mem_mb":5.5,"disk_size":"31.3M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pyimg4","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.5,"import_time_s":0.17,"mem_mb":5.5,"disk_size":"32M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pyimg4","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.17,"mem_mb":6.1,"disk_size":"22.9M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pyimg4","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.4,"import_time_s":0.18,"mem_mb":6.2,"disk_size":"24M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pyimg4","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":"pyimg4","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},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pyimg4","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.12,"mem_mb":4.4,"disk_size":"27.5M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pyimg4","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.9,"import_time_s":0.12,"mem_mb":4.3,"disk_size":"29M"}]}}