Python wrapper for Google's Draco Mesh Compression Library
Project Links
Meta
Author: Manuel Castro, William Silversmith :: Contributors :: Fatih Erol, Faru Nuri Sonmez, Forrest Collman, Zeyu Zhao, Denis Riviere, Brett Tully, Hanseul Jun, Afshawn Lotfi, Pan Xinmiao, Kenneth Bongort, Ed Schmerling, Philipp Schlegel
Classifiers
Intended Audience
- Developers
Development Status
- 5 - Production/Stable
Programming Language
- Python
- Python :: 3
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
- Python :: 3.15
Topic
- Utilities
Operating System
- POSIX
- MacOS
- Microsoft :: Windows :: Windows 10
DracoPy
import os
import DracoPy
with open('bunny.drc', 'rb') as draco_file:
mesh = DracoPy.decode(draco_file.read())
print(f"number of points: {len(mesh.points)}")
print(f"number of faces: {len(mesh.faces)}")
print(f"number of normals: {len(mesh.normals)}")
# Note: If mesh.points is an integer numpy array,
# it will be encoded as an integer attribute. Otherwise,
# it will be encoded as floating point.
binary = DracoPy.encode(mesh.points, mesh.faces)
with open('bunny_test.drc', 'wb') as test_file:
test_file.write(encoding_test)
# If faces is omitted, DracoPy will encode a point cloud
binary = Dracopy.encode(mesh.points)
# Options for encoding:
binary = Dracopy.encode(
mesh.points, faces=mesh.faces,
quantization_bits=14, compression_level=1,
quantization_range=-1, quantization_origin=None,
create_metadata=False, preserve_order=False,
colors=mesh.colors
)
DracoPy is a Python wrapper for Google's Draco mesh compression library.
Installation
Binary wheels are available for users with Python >= 3.6 and pip >= 20.
Installation from source requires Python >= 3.6, pip >= 10, and a C++ compiler that is fully compatible with C++11.
It supports Linux, OS X, and Windows. Numpy is required.
pip install DracoPy
Acknowledgements
We graciously thank The Stanford 3D Scanning Repository for providing the Stanford Bunny test model.
2.1.0
Sep 17, 2026
2.0.0
Nov 11, 2025
1.7.0
Sep 13, 2025
1.5.0
Mar 05, 2025
1.4.2
Dec 05, 2024
1.4.1
Oct 15, 2024
1.4.0
Jan 11, 2024
1.3.0
Mar 27, 2023
1.2.1
Mar 26, 2023
1.2.0
Aug 19, 2022
1.1.1
Apr 10, 2022
1.1.0
Apr 06, 2022
1.0.1
Dec 20, 2021
1.0.0
Dec 14, 2021
0.0.19
Mar 23, 2021
0.0.15
Oct 25, 2019
0.0.14
Oct 10, 2019
0.0.13
Sep 23, 2019
0.0.11
Jun 25, 2019
0.0.10
Apr 29, 2019
0.0.9
Apr 29, 2019
0.0.8
Apr 09, 2019
0.0.7
Apr 01, 2019
0.0.6
Mar 27, 2019
0.0.5
Mar 22, 2019
0.0.3
Mar 21, 2019
0.0.2
Mar 21, 2019
0.0.1
Mar 06, 2019
0.0.0
Mar 06, 2019
Wheel compatibility matrix
Files in release
dracopy-2.1.0-cp310-cp310-macosx_10_9_x86_64.whl (2.7MiB)
dracopy-2.1.0-cp310-cp310-macosx_11_0_arm64.whl (2.5MiB)
dracopy-2.1.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (4.6MiB)
dracopy-2.1.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.8MiB)
dracopy-2.1.0-cp310-cp310-musllinux_1_2_aarch64.whl (5.7MiB)
dracopy-2.1.0-cp310-cp310-musllinux_1_2_x86_64.whl (5.8MiB)
dracopy-2.1.0-cp310-cp310-win32.whl (4.3MiB)
dracopy-2.1.0-cp310-cp310-win_amd64.whl (5.0MiB)
dracopy-2.1.0-cp311-cp311-macosx_10_9_x86_64.whl (2.7MiB)
dracopy-2.1.0-cp311-cp311-macosx_11_0_arm64.whl (2.5MiB)
dracopy-2.1.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (4.7MiB)
dracopy-2.1.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.8MiB)
dracopy-2.1.0-cp311-cp311-musllinux_1_2_aarch64.whl (5.7MiB)
dracopy-2.1.0-cp311-cp311-musllinux_1_2_x86_64.whl (5.9MiB)
dracopy-2.1.0-cp311-cp311-win32.whl (4.3MiB)
dracopy-2.1.0-cp311-cp311-win_amd64.whl (5.0MiB)
dracopy-2.1.0-cp312-cp312-macosx_10_13_x86_64.whl (2.7MiB)
dracopy-2.1.0-cp312-cp312-macosx_11_0_arm64.whl (2.5MiB)
dracopy-2.1.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (4.6MiB)
dracopy-2.1.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.8MiB)
dracopy-2.1.0-cp312-cp312-musllinux_1_2_aarch64.whl (5.7MiB)
dracopy-2.1.0-cp312-cp312-musllinux_1_2_x86_64.whl (5.8MiB)
dracopy-2.1.0-cp312-cp312-win32.whl (4.3MiB)
dracopy-2.1.0-cp312-cp312-win_amd64.whl (5.0MiB)
dracopy-2.1.0-cp313-cp313-macosx_10_13_x86_64.whl (2.7MiB)
dracopy-2.1.0-cp313-cp313-macosx_11_0_arm64.whl (2.5MiB)
dracopy-2.1.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (4.6MiB)
dracopy-2.1.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.8MiB)
dracopy-2.1.0-cp313-cp313-musllinux_1_2_aarch64.whl (5.7MiB)
dracopy-2.1.0-cp313-cp313-musllinux_1_2_x86_64.whl (5.8MiB)
dracopy-2.1.0-cp313-cp313-win32.whl (4.3MiB)
dracopy-2.1.0-cp313-cp313-win_amd64.whl (5.0MiB)
dracopy-2.1.0-cp314-cp314-macosx_10_15_x86_64.whl (2.7MiB)
dracopy-2.1.0-cp314-cp314-macosx_11_0_arm64.whl (2.5MiB)
dracopy-2.1.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (4.6MiB)
dracopy-2.1.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.8MiB)
dracopy-2.1.0-cp314-cp314-musllinux_1_2_aarch64.whl (5.7MiB)
dracopy-2.1.0-cp314-cp314-musllinux_1_2_x86_64.whl (5.8MiB)
dracopy-2.1.0-cp314-cp314-win32.whl (4.4MiB)
dracopy-2.1.0-cp314-cp314-win_amd64.whl (5.1MiB)
dracopy-2.1.0-cp314-cp314t-macosx_10_15_x86_64.whl (2.7MiB)
dracopy-2.1.0-cp314-cp314t-macosx_11_0_arm64.whl (2.5MiB)
dracopy-2.1.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (4.6MiB)
dracopy-2.1.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.7MiB)
dracopy-2.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl (5.7MiB)
dracopy-2.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl (5.8MiB)
dracopy-2.1.0-cp314-cp314t-win32.whl (4.4MiB)
dracopy-2.1.0-cp314-cp314t-win_amd64.whl (5.1MiB)
dracopy-2.1.0-cp315-cp315-macosx_10_15_x86_64.whl (2.7MiB)
dracopy-2.1.0-cp315-cp315-macosx_11_0_arm64.whl (2.5MiB)
dracopy-2.1.0-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (4.6MiB)
dracopy-2.1.0-cp315-cp315-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.8MiB)
dracopy-2.1.0-cp315-cp315-musllinux_1_2_aarch64.whl (5.7MiB)
dracopy-2.1.0-cp315-cp315-musllinux_1_2_x86_64.whl (5.8MiB)
dracopy-2.1.0-cp315-cp315-win32.whl (4.4MiB)
dracopy-2.1.0-cp315-cp315-win_amd64.whl (5.1MiB)
dracopy-2.1.0-cp39-cp39-macosx_10_9_x86_64.whl (2.7MiB)
dracopy-2.1.0-cp39-cp39-macosx_11_0_arm64.whl (2.5MiB)
dracopy-2.1.0-cp39-cp39-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (4.6MiB)
dracopy-2.1.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (4.7MiB)
dracopy-2.1.0-cp39-cp39-musllinux_1_2_aarch64.whl (5.7MiB)
dracopy-2.1.0-cp39-cp39-musllinux_1_2_x86_64.whl (5.8MiB)
dracopy-2.1.0-cp39-cp39-win32.whl (4.3MiB)
dracopy-2.1.0-cp39-cp39-win_amd64.whl (5.0MiB)
dracopy-2.1.0.tar.gz (79.5MiB)
No dependencies