typed-mujoco
typed-mujoco is an unofficial companion of the official mujoco Python
package. It ships 29 partial PEP 561 stubs, not the engine or a runtime fork.
These stubs are manually maintained against the official MuJoCo 3.15.0 wheel.
The Apache 2.0 license and upstream copyright notices remain with the stubs.
Version 3.15.0.0 requires mujoco>=3.15.0 and Python 3.10 or newer.
The stubs were verified against MuJoCo 3.15.0. Later official releases are
allowed, but need a compatibility check against their installed API. Update
the stubs if that check finds changes.
The partial marker identifies modules without companion stubs. However,
ty==0.0.85 does not resolve upstream-only modules such as mujoco.minimize;
it reports unresolved-import. Other uncovered modules and MJX, if installed,
may fail static imports too, even though runtime imports work. The tests check
the ty error on a real upstream module; MJX fallback is not covered. Optional
Filament and Studio native modules are not supplied by this companion and
may be unavailable at runtime.
Installation
uv pip install typed-mujoco
import mujoco
xml = (
'<mujoco><worldbody><body name="ball"><freejoint/>'
'<geom size=".1"/></body></worldbody></mujoco>'
)
model = mujoco.MjModel.from_xml_string(xml)
data = mujoco.MjData(model)
mujoco.mj_step(model, data)
Developer build and checks
From the repository root, build and check the installed wheel with Python 3.13:
uv venv --python 3.13 typed-mujoco/.venv
uv build typed-mujoco --python 3.13 --out-dir typed-mujoco/dist
uv pip install --python typed-mujoco/.venv/bin/python typed-mujoco/dist/typed_mujoco-3.15.0.0-py3-none-any.whl
uv pip install --python typed-mujoco/.venv/bin/python --upgrade --default-index https://pypi.org/simple mujoco
uv pip install --python typed-mujoco/.venv/bin/python --group typed-mujoco/pyproject.toml:typing
PATH="/usr/sbin:typed-mujoco/.venv/bin:$PATH" MUJOCO_GL=disable typed-mujoco/.venv/bin/python -I typed-mujoco/tests/check.py
typed-mujoco/.venv/bin/ruff check --config typed-mujoco/pyproject.toml typed-mujoco/tests typed-mujoco/mujoco-stubs
typed-mujoco/.venv/bin/ruff format --check --config typed-mujoco/pyproject.toml typed-mujoco/tests typed-mujoco/mujoco-stubs
uv build typed-mujoco/dist/typed_mujoco-3.15.0.0.tar.gz --wheel --python 3.13 --out-dir typed-mujoco/dist/roundtrip
uv pip install --python typed-mujoco/.venv/bin/python typed-mujoco/dist/roundtrip/typed_mujoco-3.15.0.0-py3-none-any.whl
PATH="/usr/sbin:typed-mujoco/.venv/bin:$PATH" MUJOCO_GL=disable typed-mujoco/.venv/bin/python -I typed-mujoco/tests/check.py
The daily CI workflow checks the latest official MuJoCo release from PyPI against the installed stubs and checks that MuJoCo still imports after the companion is uninstalled. Check compatibility again before future releases.
Metadata
Release files for typed-mujoco 3.15.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| typed_mujoco-3.15.0.0.tar.gz | 110.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| typed_mujoco-3.15.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 233.8 kB
Release files / typed_mujoco-3.15.0.0.tar.gz
| Download URL | typed_mujoco-3.15.0.0.tar.gz |
|---|---|
| Size | 110.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e588d762a171829fbe3c772db5cf92726bc2884949bd2788b808539cb7e2157b
|
|
BLAKE2b-256 checksum How to use checksums |
aeb8326c3dfcae259103522ca03bc0030e5b357cbc70144d8995bd015788fb3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / typed_mujoco-3.15.0.0-py3-none-any.whl
| Download URL | typed_mujoco-3.15.0.0-py3-none-any.whl |
|---|---|
| Size | 123.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a95f3185e40c75e4a498be25918a2f786c1e07ee58f66814f9dc336b3a88df2
|
|
BLAKE2b-256 checksum How to use checksums |
d10bb3b9c6a4f69c2b6bc775a31e0acbc3a12ff8e8e521cd35b917d7f581647c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|