Metadata-Version: 2.2
Name: rapidobj
Version: 0.1.5
Summary: Fast OBJ parser with Python bindings
License: MIT License
         
         Copyright (c) 2026 rapidobj contributors
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
         
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: C++
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Classifier: Typing :: Typed
Project-URL: Homepage, https://github.com/dhh/rapidobj-play
Project-URL: Repository, https://github.com/dhh/rapidobj-play
Project-URL: Issues, https://github.com/dhh/rapidobj-play/issues
Requires-Python: >=3.12
Requires-Dist: numpy
Description-Content-Type: text/markdown

## 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:

```bash
python -m pip install rapidobj
```

From source:

```bash
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.

For releases, use the helper script so the package version and tag stay in
lockstep:

```bash
uv run python scripts/release.py X.Y.Z
git push origin HEAD vX.Y.Z
```

## Minimal Usage

```python
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`.
