MARS Python SDK
Arm64 macOS SDK for applications that own MARS virtual input devices. The async control client uses IPC protocol v3 and its native extension delegates shared-memory writes to the existing Rust SDK.
Install
uv add mars-sdk
The wheel requires Apple Silicon macOS, CPython 3.11 or newer, and an installed MARS runtime.
Build from this repository
uv sync --locked
Run the complete example with uv run python examples/virtual_mic.py.
Declare and write a virtual microphone
from array import array
from mars_sdk import AppVirtualInputSpec, MarsClient
client = MarsClient()
result = await client.set_virtual_inputs(
"com.example.recorder",
[
AppVirtualInputSpec(
id="mic",
name="Recorder Mic",
uid="com.example.recorder.mic",
sample_rate=48_000,
channels=1,
)
],
)
writer = result.virtual_mics[0].open_live_writer()
writer.write_f32_interleaved_live(array("f", [0.0] * 480))
writer.flush_silence()
writer.close()
set_virtual_inputs atomically replaces the app's complete collection. Pass
an empty list to delete that app's collection. Declarations survive daemon
restart and mars clear; submit the same complete collection again when the
app needs fresh writer handles.
The public control API is ping, status, set_virtual_inputs,
get_virtual_inputs, and read-only virtual_input_status. Inputs are fixed
at 48 kHz and support mono or stereo. Each id is app-local; each uid must
be globally unique. The Python writer accepts a C-contiguous Float32 buffer
and copies each submitted chunk into native memory before writing it.
Metadata
Release files for mars-sdk 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mars_sdk-0.1.3-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details for mars_sdk-0.1.3-cp311-abi3-macosx_11_0_arm64.whl |
Release files / mars_sdk-0.1.3-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | mars_sdk-0.1.3-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 443.9 kB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d803087fee796459c872a6295ada593af82eee2dc9aac3906720b395b03b9ff6
|
|
BLAKE2b-256 checksum How to use checksums |
30255c314579dbb278a07970755820ef6dda56633f3b5b3ec4df7f613091cd5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mars-sdk 0.1.3
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.
No provenance found
None of the files in this release were uploaded with 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.