Skip to main content

Fast OBJ parser with Python bindings

Project description

rapidobj

rapidobj is a fast Wavefront OBJ parser exposed as a Python extension module using nanobind. It returns NumPy views for mesh data so parsing and data access stay efficient.

Requirements

  • Python 3.12+
  • CMake 3.18+
  • A C++17 compiler

Install

From PyPI:

python -m pip install rapidobj

From source:

uv sync
uv build --wheel --python 3.12 --no-sources
python -m pip install dist/rapidobj-0.1.3-cp312-cp312-*.whl

For release builds, GitHub Actions is the authoritative wheel pipeline. Pull requests validate the package, and version tags build Linux and Windows wheels for CPython 3.12, 3.13, and 3.14. Tag builds publish the validated artifacts to PyPI via Trusted Publishing after a strict version check.

Minimal Usage

from rapidobj import parse_obj

result = parse_obj("mesh.obj")
if not result.ok:
    raise RuntimeError(result.error_message)

print(result.vertices.shape)  # (V, 3)
print(result.faces.shape)     # (F, 3)
print(result.texcoords.shape) # (T, 2)

See examples/ for runnable scripts.

API

  • parse_obj(filename: str) -> ObjParseResult
  • ObjParseResult.ok: bool
  • ObjParseResult.error_message: str
  • ObjParseResult.vertex_count: int
  • ObjParseResult.normal_count: int
  • ObjParseResult.uv_count: int
  • ObjParseResult.shape_count: int
  • ObjParseResult.material_count: int
  • ObjParseResult.texture_paths: list[str]
  • ObjParseResult.vertices: np.ndarray
  • ObjParseResult.faces: np.ndarray
  • ObjParseResult.texcoords: np.ndarray
  • ObjParseResult.wedge_texcoord_indices: np.ndarray
  • ObjParseResult.wedge_material_ids: np.ndarray

Release Notes

Release workflow and checklist are documented in RELEASE.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rapidobj-0.1.3.tar.gz (76.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rapidobj-0.1.3-cp314-cp314-win_amd64.whl (151.9 kB view details)

Uploaded CPython 3.14Windows x86-64

rapidobj-0.1.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (205.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rapidobj-0.1.3-cp313-cp313-win_amd64.whl (148.0 kB view details)

Uploaded CPython 3.13Windows x86-64

rapidobj-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (205.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rapidobj-0.1.3-cp312-cp312-win_amd64.whl (148.0 kB view details)

Uploaded CPython 3.12Windows x86-64

rapidobj-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (205.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file rapidobj-0.1.3.tar.gz.

File metadata

  • Download URL: rapidobj-0.1.3.tar.gz
  • Upload date:
  • Size: 76.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rapidobj-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ec60da6aad1228b6f9fa26507814d9e024a1bfa5803f419c0605673c0db7bbd6
MD5 3f0af15a21b4dbd236b361e268b2490e
BLAKE2b-256 92436e543d8d28443a04a410460b43d5a6e1e551edbbb22405b6c4dbb9132b22

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidobj-0.1.3.tar.gz:

Publisher: release.yml on evopen/python-rapidobj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidobj-0.1.3-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: rapidobj-0.1.3-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 151.9 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rapidobj-0.1.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 80e0c8b41d8b123150c19e8c15752801aa7a1414ce559348c39dfbd3203085d0
MD5 da6459a991f81d9779ee17b44e64dfa3
BLAKE2b-256 c5ea95f06a6bfdc4b33c1b22795fd3cf275a09fa8b1075950b4ea12dded7d1c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidobj-0.1.3-cp314-cp314-win_amd64.whl:

Publisher: release.yml on evopen/python-rapidobj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidobj-0.1.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rapidobj-0.1.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 893c820fe5940751b783bdfc7771755c2420d6fb5afc165241c1816cf5ec29bd
MD5 b9a2fa1c073fb99f75fe44741a869df4
BLAKE2b-256 414c6c2d4f5b8e01ee5365c7f3fa1613a842b5b7cbc16e165c6547ca6555181c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidobj-0.1.3-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on evopen/python-rapidobj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidobj-0.1.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: rapidobj-0.1.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 148.0 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rapidobj-0.1.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9bc09d7bb021372fb74d9f6c4569a5db725b5663d1836127729a80cc40b7c556
MD5 96f0d4ed3455d7c417a13d3ef94e1163
BLAKE2b-256 e835343e71cfca5421d453d8387c921b5dfee41d8ccbc3a36c8a7bd36b93310a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidobj-0.1.3-cp313-cp313-win_amd64.whl:

Publisher: release.yml on evopen/python-rapidobj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidobj-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rapidobj-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6b2fbbff6b1c77074fc876762c2e05512a1b92989fb210b8680e1d87065dcaf7
MD5 c7bd7d3b647ca9626bb18a879b983837
BLAKE2b-256 7536deec79a617014aa6849b71d7b259ac0795d01ba428b1c5eef6690c8bc16b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidobj-0.1.3-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on evopen/python-rapidobj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidobj-0.1.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rapidobj-0.1.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 148.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rapidobj-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 399b6b67d4d2ead19ae08c2adb60ab6196c0bdf81782e0a931bb70a5f87ad32d
MD5 7f45f2b2b9876d3b2d49a7a49ccdd9f1
BLAKE2b-256 7e5638e36e70cf9101b378df3d40610f5eb0e91e577f286e02fc8dcca7fe13b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidobj-0.1.3-cp312-cp312-win_amd64.whl:

Publisher: release.yml on evopen/python-rapidobj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rapidobj-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rapidobj-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1bed8ddc0ad204bbbded74fa68d55250c03c1343be3618a518dfa4ecdda8e442
MD5 bf3f97e2681cf1767ddd5e3e7d9b3fe4
BLAKE2b-256 012ff58b47465ca55afb380e8ba7026c22d71d9eb9045335d1703a3b0398434b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rapidobj-0.1.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on evopen/python-rapidobj

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page