pygltflib
Python library for reading, writing and managing 3D objects in the Khronos Group gltf and gltf2 formats.
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 pygltflibuv
uv add pygltflibpoetry
poetry add pygltflibInstalling 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
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
panda3d-gltfAdds glTF 2.0 file loading to Panda3D,…
permissive · top 15,000 on PyPI
pyrenderPyrender renders 3D scenes to images and…
permissive · top 5,000 on PyPI
cascadioConverts STEP files to GLB (glTF binary) format…
unclear · top 15,000 on PyPI
lib3mflib3mf reads, writes, and validates 3D…
permissive · top 15,000 on PyPI
meshioReads and writes mesh files in dozens of…
permissive · top 5,000 on PyPI
plyfileplyfile reads and writes ASCII and binary PLY…
copyleft · top 5,000 on PyPI
moderngl-windowmoderngl-window simplifies OpenGL window…
permissive · top 15,000 on PyPI
pytetwildpytetwild converts surface meshes into…
copyleft · top 15,000 on PyPI
PyGEL3DPyGEL3D provides Python bindings for a C++…
permissive · top 15,000 on PyPI
xatlasGenerates UV texture coordinates for 3D…
permissive · top 15,000 on PyPI