RedNoise Python bindings
Python ctypes bindings for the RedNoise CPU software renderer. They call the
stable C ABI declared in include/rednoise/rednoise.h. There is no compiled
extension module: the bindings load the RedNoise shared library at runtime. The
native library is built and bundled into the package, so a normal install is
self-contained.
Install
pip install rednoise
Prebuilt wheels ship the native library, so on a supported platform this is all
you need. Installing from an sdist compiles the native library on your machine
via CMake, so you need a C++23-capable compiler (GCC 12+, Clang 15+, or MSVC
2022+) and CMake 3.24 or newer. The build uses the vendored glm in
third_party/ and runs fully offline; it does not fetch SDL3 or any other
optional dependency.
Under the hood, pip install drives scikit-build-core and CMake to build only
the installable rednoise library (-DBUILD_LIB=ON, everything else off) and
installs the resulting shared library into the importable rednoise/ package:
- Linux:
librednoise.so - macOS:
librednoise.dylib - Windows:
rednoise.dll
Pillow is optional and only needed for Image.to_pillow() or saving non-PNG
formats:
pip install "rednoise[pillow]"
Library discovery
The bundled library is found automatically. For development against a separately built library, the bindings locate it in this order:
- The library bundled next to the package (what a wheel installs).
- The
REDNOISE_LIBRARYenvironment variable (an explicit path to the file). - The system search path (
ctypes.util.find_library("rednoise")). - Common local build paths (
build/, next to the package, and similar).
To override with a locally built library, set REDNOISE_LIBRARY:
# Linux
export REDNOISE_LIBRARY="$PWD/build/librednoise.so"
# macOS
export REDNOISE_LIBRARY="$PWD/build/librednoise.dylib"
# Windows (cmd)
set REDNOISE_LIBRARY=%CD%\build\rednoise.dll
Develop from a local checkout
Install the bindings straight from this directory:
pip install ./bindings/python
Add the Pillow extra with:
pip install "./bindings/python[pillow]"
You can still build the shared library by hand from the repository root and
point REDNOISE_LIBRARY at it:
cmake -B build -S . -DBUILD_LIB=ON -DBUILD_APP=OFF
cmake --build build
Usage
import rednoise
print(rednoise.version())
with rednoise.Scene.load_obj("assets/cornell-box.obj") as scene:
print("triangles:", scene.triangle_count)
image = scene.render(mode="pathtraced", width=400, height=300, samples=64)
image.save("cornell.png")
Scene.render accepts a render mode as a RenderMode enum, an integer, or a
name string: "wireframe", "rasterised", "raytraced", or "pathtraced".
The returned Image exposes .rgba (raw RGBA8 bytes), .size, .save(path),
and .to_pillow() when Pillow is installed.
A complete runnable example lives in example.py. Run it from the repository
root (after building the library and setting REDNOISE_LIBRARY):
python bindings/python/example.py
Metadata
Release files for rednoise 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rednoise-0.2.1.tar.gz | 8.9 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| rednoise-0.2.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| rednoise-0.2.1-py3-none-win32.whl | Python 3 | none | Windows x86-32 | Details |
| rednoise-0.2.1-py3-none-manylinux_2_34_x86_64.whl | Python 3 | none | Linux glibc 2.34+ x86-64 | Details |
| rednoise-0.2.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 5.6 MB
Release files / rednoise-0.2.1.tar.gz
| Download URL | rednoise-0.2.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c26ea03f2fbb6dd6f99026a162f33cfcbbfe1023df82b719fe4c4801559aa6c
|
|
BLAKE2b-256 checksum How to use checksums |
29431ff3e5e3f7a775ac4e4acab205015006dd787785506e9fcd03be6b9752b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / rednoise-0.2.1-py3-none-win_amd64.whl
| Download URL | rednoise-0.2.1-py3-none-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
93cdd25dd406f853ff7e49e799c8762c8d903e5cc223b6b3a3d00d6bbea5b45c
|
|
BLAKE2b-256 checksum How to use checksums |
c3761c46c0983009cca2b8da982da26e1063be00e64f44a0f1e1cf59c70953e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / rednoise-0.2.1-py3-none-win32.whl
| Download URL | rednoise-0.2.1-py3-none-win32.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
2f62946aea9c3fef6fbcd6a18391cebf340d4986997fc26150703f727f51bd8d
|
|
BLAKE2b-256 checksum How to use checksums |
1a2c5464a2fcb545d9dd6075f8fb73d90adff9e2eb6fb109f622250b8f8bfe6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / rednoise-0.2.1-py3-none-manylinux_2_34_x86_64.whl
| Download URL | rednoise-0.2.1-py3-none-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | Linux glibc 2.34+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
872c81d7b496001adad8c696f84daf821e59d3ee803d4be4da1533d514c5cda4
|
|
BLAKE2b-256 checksum How to use checksums |
5d2c361df494c3ad5939b33c83e355abf502cc4bb34e29ee06d0e1bf3f024253
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / rednoise-0.2.1-py3-none-macosx_11_0_arm64.whl
| Download URL | rednoise-0.2.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4457bcddd0d075747859ab426ea7ddb0016f6c89ff95df8a9ab2e17418c93d25
|
|
BLAKE2b-256 checksum How to use checksums |
90d752d84242b3171b2f2a0b26ae54aacb8a509242878663b59b6e1aa7196539
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency log