### Local install Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Installs the package from the current directory. ```powershell python -m pip install . ``` -------------------------------- ### Editable install with uv Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Performs an editable install using uv. ```powershell uv pip install -e . ``` -------------------------------- ### Install from PyPI Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Installs the prebuilt wheel from PyPI, avoiding the need for C++ build tools on student machines. ```powershell python -m pip install minipy3dr ``` -------------------------------- ### Run the Demo Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Runs the demo. The first command works from source; the second works after installation. ```powershell python -m minipy3dr ``` ```powershell minipy3dr-demo ``` -------------------------------- ### Install minipy3dr with uv Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Installs minipy3dr using uv. ```powershell uv pip install minipy3dr ``` -------------------------------- ### Editable install Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Performs an editable install for development purposes. ```powershell python -m pip install -e . ``` -------------------------------- ### Install from GitHub source Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Installs the package directly from the GitHub repository, which triggers a local build. ```powershell python -m pip install "git+https://github.com/andogensi/MiniPy3DR.git" ``` -------------------------------- ### Quick Start: Create and rotate a cube Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Creates a window, adds a cube, sets a light, and rotates the cube each frame via the update callback. ```python from minipy3dr import App app = App(title="MiniPy3DR") cube = app.cube(position=(0, 0, -5), size=2, color=(220, 120, 80), ambient=0.22) app.light(direction=(-0.4, -0.8, -0.6)) def update(app, delta): app.rotate(cube, y=delta) app.run(update=update) ``` -------------------------------- ### Install version tag from GitHub Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Installs a specific version tag from the GitHub repository. ```powershell python -m pip install "git+https://github.com/andogensi/MiniPy3DR.git@v0.4.2" ``` -------------------------------- ### Install branch from GitHub Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Installs a specific branch from the GitHub repository. ```powershell python -m pip install "git+https://github.com/andogensi/MiniPy3DR.git@main" ``` -------------------------------- ### Install from GitHub source with uv Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Installs the package from GitHub using the uv package manager. ```powershell uv pip install "git+https://github.com/andogensi/MiniPy3DR.git" ``` -------------------------------- ### Import the beginner API Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Imports the beginner API after installation. ```python from minipy3dr import App ``` -------------------------------- ### Install branch from GitHub with uv Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Installs a specific branch from the GitHub repository using uv. ```powershell uv pip install "git+https://github.com/andogensi/MiniPy3DR.git@main" ``` -------------------------------- ### Install minipy3dr from a branch or tag Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Installs from a specific branch or tag. ```powershell python -m pip install "git+https://github.com/andogensi/MiniPy3DR.git@main" python -m pip install "git+https://github.com/andogensi/MiniPy3DR.git@v0.4.2" ``` -------------------------------- ### Editable install without dependencies Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Performs an editable install while skipping dependency resolution, useful for offline environments. ```powershell python -m pip install -e . --no-deps ``` -------------------------------- ### Run Renderer Benchmark Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Runs the renderer benchmark. The first command works from source; the second works after installation. ```powershell python -m minipy3dr.benchmark ``` ```powershell minipy3dr-benchmark ``` -------------------------------- ### Pin PyPI release version Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Installs a specific version of the package to ensure consistency across classroom machines. ```powershell python -m pip install "minipy3dr==0.4.2" ``` -------------------------------- ### Build wheel and sdist Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Builds the distribution files using setuptools. ```powershell python -m pip install -e ".[dev]" python -m build ``` -------------------------------- ### Build wheel and sdist with uv Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Builds the distribution files using uv. ```powershell uv pip install -e ".[dev]" uv run python -m build ``` -------------------------------- ### Quick Smoke Benchmark Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Runs a quick smoke test of the benchmark with a single frame, no warmup, one case, and one resolution. ```powershell python -m minipy3dr.benchmark --frames 1 --warmup 0 --cases sphere_obj_1 --resolutions 640x480 ``` -------------------------------- ### Build release-grade native wheel Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Builds a wheel with the native C++ extension enabled by setting the environment variable. ```powershell $env:MINIPY3DR_REQUIRE_NATIVE = "1" python -m pip wheel . --no-deps --no-build-isolation --wheel-dir dist ``` -------------------------------- ### Load OBJ Mesh: app.obj() Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Loads an OBJ mesh from a file, adds it to the scene, and rotates it in the update loop. ```python from minipy3dr import App app = App(title="OBJ demo") model = app.obj("assets/model.obj", position=(0, 0, -6), color=(160, 210, 255)) app.light(direction=(-0.4, -0.8, -0.6)) def update(app, delta): app.rotate(model, y=delta) app.run(update=update) ``` -------------------------------- ### Build local smoke wheel Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Builds a wheel for the current environment without dependencies or build isolation. ```powershell python -m pip wheel . --no-deps --no-build-isolation --wheel-dir dist ``` -------------------------------- ### Publish version tag Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Publishes a new version by tagging the release and pushing the tag to the remote repository. The Build and publish package workflow then uploads Windows wheels and the source distribution to PyPI. ```powershell git tag v0.4.2 git push origin main git push origin v0.4.2 ``` -------------------------------- ### Force reinstall from GitHub Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Upgrades and forces a reinstall of the package from the main branch on GitHub. ```powershell python -m pip install --upgrade --force-reinstall "git+https://github.com/andogensi/MiniPy3DR.git@main" ``` -------------------------------- ### Load OBJ Mesh: load_obj() Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Lower-level alternative to app.obj() that returns a Mesh object directly. ```python from minipy3dr import load_obj mesh = load_obj("assets/model.obj") ``` -------------------------------- ### Check package metadata Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Validates the generated distribution files using twine. ```powershell python -m twine check dist/* ``` -------------------------------- ### Check native renderer availability Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Checks whether the native renderer is available. ```powershell python -c "from minipy3dr.render import is_native_available; print(is_native_available())" ``` -------------------------------- ### Release via Git tag Source: https://github.com/andogensi/minipy3dr/blob/main/docs/packaging.md Commands to commit changes and push a version tag to trigger the GitHub Actions release workflow. ```powershell git status # Update pyproject.toml and minipy3dr/__init__.py to the new version first. git add . git commit -m "Prepare MiniPy3DR release" git branch -M main git remote add origin https://github.com/andogensi/MiniPy3DR.git git push -u origin main git tag v0.4.2 git push origin v0.4.2 ``` -------------------------------- ### Force native rendering with App and NativeRenderer Source: https://github.com/andogensi/minipy3dr/blob/main/README.md Forces native rendering. App uses mode="auto" by default, which selects the native renderer when available and falls back to the NumPy renderer otherwise. ```python from minipy3dr import App, NativeRenderer, Renderer app = App(mode="native") renderer = NativeRenderer(size=(800, 600)) # Same as: Renderer(size=(800, 600), mode="native") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.