Skip to main content

Websockets exposer for the spacenav driver (spacenav‑ws)

PyPI version Build Status License

Table of Contents

About

spacenav‑ws is a tiny Python CLI that exposes your 3Dconnexion SpaceMouse over a secure WebSocket, so Onshape on Linux can finally consume it. Under the hood it reverse‑engineers the same traffic Onshape’s Windows client uses and proxies it into your browser.

This lets you use FreeSpacenav/spacenavd on Linux with Onshape.

Prerequisites

  • uv/uvx or another Python env manager.
  • A running instance of spacenavd
  • A modern browser (Chrome/Firefox) with a userscript manager (Tampermonkey/Greasemonkey)

Usage

  1. Validate spacenavd
uvx spacenav-ws@latest read-mouse
# → should print spacemouse events
  1. Run the server and trust the cert
uvx spacenav-ws@latest serve

Now open: https://127.51.68.120:8181. When prompted, add a browser exception for the self‑signed cert.

  1. Install Tampermonkey and add the userscript

Install Tampermonkey. After installing, click this link for one‑click install of the script.

  1. Open an Onshape document and test your mouse!

Developing

git clone https://github.com/you/spacenav-ws.git
cd spacenav-ws
uv run spacenav-ws serve --hot-reload

This starts the server with Uvicorn's code watching / hot reload feature enabled. When making changes the server restarts and any websocket state is nuked, however, Onshape should immediately reconnect automatically! This makes for a very smooth and fast iteration workflow.

Metadata

Release files for spacenav-ws 0.1.5

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

Source distribution (sdist)

Source distribution for spacenav-ws 0.1.5
File Size Uploaded Provenance
spacenav_ws-0.1.5.tar.gz 61.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for spacenav-ws 0.1.5
File Interpreter ABI Platform
spacenav_ws-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 88.8 kB

Release files / spacenav_ws-0.1.5.tar.gz

Download URL spacenav_ws-0.1.5.tar.gz
Size 61.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4f8ecc3ce98df5b84009ab6c85be3d386260d6bc5ba9037b0a686c0476924c69
BLAKE2b-256 checksum
How to use checksums
8de5e74c9fb892d7778fb4f4de0edf3a9315e9e453b195a40eb21bf5904c4453
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

Release files / spacenav_ws-0.1.5-py3-none-any.whl

Download URL spacenav_ws-0.1.5-py3-none-any.whl
Size 27.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83b251e12f9aade44030d38432a542e26ee3a31b76bfc7ec272ac2706ee3871e
BLAKE2b-256 checksum
How to use checksums
5fb92f3239a0ffc3971d216aa4b2e257373d96883c7e6a7ffaf0157a80248d54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.6.14

Security for spacenav-ws 0.1.5

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.

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