Skip to main content
Incomplete provenance

2 of 3 files were uploaded without provenance metadata. View details.

MiraBox N4 Pro for Python

Async Python bindings for the Rust mirabox-n4pro crate. Requires a supported HID device and Python 3.9 or newer.

From the mirabox-n4pro-py directory, install with python -m pip install . (requires a Rust toolchain; pip installs maturin as the build backend).

For editable development, from the repository root (with just and uv installed):

just install-maturin  # Set up maturin in mirabox-n4pro-py/.venv (optional separate step)
just install-python   # Build and install the module; also sets up maturin
mirabox-n4pro-py/.venv/bin/python -c 'import mirabox_n4pro; print(mirabox_n4pro.PHYSICAL_BUTTON_IMAGE_SIZE)'

The project-local .venv is ignored by Git. Rerun just install-python after changing Rust code.

import asyncio
from mirabox_n4pro import MiraboxN4Pro, PHYSICAL_BUTTON_IMAGE_SIZE

async def main():
    device = await MiraboxN4Pro.connect()
    if device is None:
        print("No MiraBox N4 Pro found")
        return

    print(device.serial_number, PHYSICAL_BUTTON_IMAGE_SIZE)
    # Supply an already encoded JPEG or PNG at 112x112, rotated 180°.
    with open("button.jpg", "rb") as image:
        await device.set_image(MiraboxN4Pro.physical_button_image_key(0), image.read())
    await device.flush()

    while True:
        report, event = await device.read_report_event()
        if event is not None:
            print(event)

asyncio.run(main())

All I/O methods return awaitables. set_image queues bytes until flush; set_background_image uploads immediately. read_event returns a dictionary or None for an unknown report; read_report_event returns (bytes, event) and retains all 512 raw bytes. Event dictionaries contain type (button, knob_pressed, knob_rotated, touch_start, touch_move, touch_end, or swipe) plus the corresponding fields (button/pressed, knob/direction, x/y, code, or direction). Indices for physical buttons and knobs are zero-based. Keep-alive is caller-controlled via await device.keep_alive(); the binding does not create a background task.

Other methods: set_screen_brightness (0–100), set_light_brightness (0–60), set_led_colors (four RGB triples), set_vibro_feedback, and clear_background_image. Image sizes are exposed as PHYSICAL_BUTTON_IMAGE_SIZE and VIRTUAL_BUTTON_IMAGE_SIZE. Device/transport failures raise OSError; invalid brightness/background dimensions raise ValueError.

Metadata

Release files for mirabox-n4pro 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Incomplete provenance

2 of 3 files were uploaded without provenance metadata.

We recommend further investigation before installing these files. View details.

Source distribution (sdist)

Source distribution for mirabox-n4pro 0.1.0
File Size Uploaded Provenance
mirabox_n4pro-0.1.0.tar.gz 27.2 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for mirabox-n4pro 0.1.0
File Interpreter ABI Platform
mirabox_n4pro-0.1.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
mirabox_n4pro-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details

Total release size: 1.2 MB

Release files / mirabox_n4pro-0.1.0.tar.gz

Incomplete provenance

This file belongs to a release with incomplete provenance: while other files in this release have provenance metadata, this file does not.

We recommend further investigation before installing this file. View details.

Download URL mirabox_n4pro-0.1.0.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b99b5889d727eb23e1e4ae1d68881d5bf0c13c03b826856ba74769436bb7d853
BLAKE2b-256 checksum
How to use checksums
51fcfba67084cb3b3cd9f0f0de11d4bb7aec04d64bbdadaead92f9240c765973
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.5

Release files / mirabox_n4pro-0.1.0-cp312-cp312-macosx_11_0_arm64.whl

Incomplete provenance

This file belongs to a release with incomplete provenance: while other files in this release have provenance metadata, this file does not.

We recommend further investigation before installing this file. View details.

Download URL mirabox_n4pro-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Size 606.1 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5bf466e653c5e44743740932cbc3420141c67d5ffaea0f3229fd47863182b013
BLAKE2b-256 checksum
How to use checksums
bd6b6712f0ba85b9fd45606510812b2c55415b0cf36d25d83a60a272be015d0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.5

Release files / mirabox_n4pro-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl

Incomplete provenance

This file belongs to a release with incomplete provenance: while this file has provenance metadata, other files in this release do not.

We recommend further investigation before installing this file. View details.

Download URL mirabox_n4pro-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 602.2 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
15d227520ca258e9fedb38b00c15a6b5d90f1f228a5cee3ff6da0e4e29e81a1d
BLAKE2b-256 checksum
How to use checksums
14c3eb1159ba309fc1294594bf603921636f8c8ddef1a766d1fdf7a7f2d9182a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 26, 2026.

Transparency log

Security for mirabox-n4pro 0.1.0

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.

Incomplete provenance

2 of 3 files were uploaded without provenance metadata.

Files with provenance 1 / 3
Files without provenance 2 / 3
Select from 3 files

Attestations for mirabox_n4pro-0.1.0.tar.gz

This file was uploaded without provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page