{"library":"pygltflib","title":"Python GLTF Library","description":"pygltflib is a Python library for reading, writing, and managing 3D objects in the Khronos Group glTF (GL Transmission Format) and glTF2 formats. It supports the entire GLTF v2 specification, including materials, animations, and extensions, with all attributes being type-hinted. The library is actively maintained, with frequent updates addressing features and bug fixes.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install pygltflib"],"cli":null},"imports":["from pygltflib import GLTF2","from pygltflib import Scene","from pygltflib import Node","from pygltflib import BufferFormat","from pygltflib.utils import glb2gltf"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom pygltflib import GLTF2, Scene, Node\n\n# Create a new GLTF2 object\ngltf = GLTF2()\n\n# Create a scene\nscene = Scene(name=\"My_New_Scene\")\ngltf.scenes.append(scene)\ngltf.scene = 0 # Set the default scene to the first one (index 0)\n\n# Create a simple node (e.g., an empty node)\nnode = Node(name=\"My_Node\")\ngltf.nodes.append(node)\n\n# Link the node to the scene\nscene.nodes.append(0) # Referencing the first node (index 0)\n\n# Define a filename\noutput_filename = \"my_simple_scene.gltf\"\n\n# Save the GLTF file\ntry:\n    gltf.save(output_filename)\n    print(f\"GLTF file saved to {output_filename}\")\nexcept Exception as e:\n    print(f\"Error saving GLTF file: {e}\")\n\n# Clean up (optional)\nif os.path.exists(output_filename):\n    os.remove(output_filename)\n    print(f\"Cleaned up {output_filename}\")","lang":"python","description":"This quickstart demonstrates how to create a basic, empty glTF 2.0 file with a scene and a node, and then save it to disk. Real-world applications would involve populating the glTF object with meshes, materials, accessors, and buffer data. Ensure you have write permissions in the execution directory for the `gltf.save()` operation.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"1.16.5","pypi_latest":"1.16.5","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.3,"avg_import_s":0.27,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.27,"mem_mb":7.2,"disk_size":"20.4M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.4,"import_time_s":0.16,"mem_mb":7.2,"disk_size":"21M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.36,"mem_mb":7.8,"disk_size":"22.6M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.3,"import_time_s":0.36,"mem_mb":7.8,"disk_size":"23M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.3,"mem_mb":7.7,"disk_size":"14.5M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.1,"import_time_s":0.32,"mem_mb":7.7,"disk_size":"15M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.26,"mem_mb":7.1,"disk_size":"14.2M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.1,"import_time_s":0.26,"mem_mb":7.1,"disk_size":"15M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.21,"mem_mb":6.6,"disk_size":"19.9M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pygltflib","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.8,"import_time_s":0.17,"mem_mb":6.6,"disk_size":"20M"}]}}