skillfed

pygltflib

Python library for reading, writing and managing 3D objects in the Khronos Group gltf and gltf2 formats.

pygltflib v1.16.5 817.4K downloads/30d#4,985 on PyPI
Permissive license AGING released

What it is and what it does

pygltflib is a Python library for working with GLTF and GLB 3D model files, the standard formats defined by the Khronos Group. It provides a complete, type-hinted API to load, create, modify, and save 3D scenes with full support for the GLTF v2 specification—including meshes, materials, animations, and vendor extensions. The library handles both text-based GLTF and binary GLB formats, and can convert between them, embed or externalize buffer data, and extract or import image files.

The package is built on three runtime dependencies: dataclasses for structured data, dataclasses-json for serialization, and deprecated for marking obsolete APIs. It works across Python 3.6 and above and is widely used in 3D graphics pipelines where standardized model interchange is needed.

Use it for:

  • Load and inspect GLTF/GLB models in a Python application to read mesh geometry, materials, and animations.
  • Convert between GLTF and GLB formats, or switch buffer storage between embedded data URIs, external binary files, and GLB blobs.
  • Extract images from GLTF files and save them as files, or import image files as assets into a model.
  • Programmatically create 3D scenes and meshes from scratch and export them in GLTF format.
  • Validate GLTF objects for specification compliance and troubleshoot structural issues in model files.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Reads, writes, and manipulates GLTF and GLB 3D model files with full support for the GLTF v2 specification, including materials, animations, and extensions.

Yes, if you need to work with GLTF/GLB files in Python. The package is mature, has no known vulnerabilities, carries a permissive license, and installs cleanly. The aging maintenance status (386 days since last release) is a minor concern for new features but not a blocker for stable, read-write operations on standard GLTF v2 files.

Install

pygltflib on PyPI

pip

pip install pygltflib

uv

uv add pygltflib

poetry

poetry add pygltflib

Installing pygltflib

Before you install

Low install friction with three lightweight runtime dependencies. Maintenance status is aging—last release was 386 days ago—so expect slower response to issues, though the package remains functional for current use.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.

Quickstart

pip install pygltflib

from pygltflib import GLTF2

gltf = GLTF2().load("model.gltf")
gltf.convert_buffers(BufferFormat.BINARYBLOB)
gltf.save("model.glb")

Requires Python 3.6 or above.

Verify before relying

  • Whether the experimental validator covers all GLTF2 specification rules or only a subset.
  • Current state of B3DM file support and whether it has been added since the documentation was written.
  • Performance characteristics when handling large models or many assets.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 3 — dataclasses, dataclasses-json, deprecated
Maintenance aging — 386 days since the last release
First released
Downloads 817,356/month — #4,985 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pygltflib-1.16.5-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

gltf file reader writerglb binary 3d modelgltf2 format handling3d model serializationkhronos gltf librarymesh buffer conversiongltf image export
3d-graphicsfile-formatkhronos-standard

More Graphics packages