Fast and Reproducible Environments with Controllable Variations
Installation · Quick Start · Environments · Documentation
stable-envs is a library of batched simulation environments that keep the full simulator state, so you can restore any step exactly and render images from it later, on CPU or GPU.
Store states instead of pixels, replay or branch from any step, and render frames from a stored state as many times as you like. 80 environment classes in 11 families share the same API.
Installation
pip install stable-envs # or: uv add stable-envs
pip install "stable-envs[pusht]" # PushT simulation and CPU rendering
pip install "stable-envs[dmcontrol,ogbench]" # add family extras as needed
stable-envs doctor # check what works on this machine
Install the robotics extra (Fetch) in its own environment, because it needs MuJoCo below 3.12, while dmcontrol, mshuman, roadster and ogbench-manipulation need 3.17. Install lists every extra and the OpenGL setup.
Quick Start
import torch
import stable_envs as snv
with snv.CartPole(num_envs=8, device="cpu") as env:
env.reset(seed=0)
actions = torch.randint(0, 2, (8, 10, 1)) # (B, T, A): ten steps for each environment
out = env.step(actions, frames=None) # step without rendering
print(out["states"].batch_size) # torch.Size([8, 10])
frames = env.render(out["states"][:, 4]) # render the state after five steps
print(frames.shape, frames.dtype) # torch.Size([8, 400, 600, 3]) torch.uint8
step returns the state after every step, and render draws a batch of frames from any of them.
The Quickstart covers state, frames, steps, save and restore, and variation. For policies, datasets and training, see stable-worldmodel.
Environments
| Family | Classes | Extra |
|---|---|---|
classic_control |
5 | none (classic for MountainCar, MountainCarContinuous and Pendulum) |
craftax |
4 | craftax |
dmcontrol |
17 | dmcontrol |
fetch |
12 | robotics |
miniworld |
1 | miniworld |
mshuman |
1 | mshuman |
navigation |
5 | none (navigation for SimplePointMaze) |
ogbench |
27 | ogbench, or ogbench-manipulation for Cube and Scene |
pusht |
2 | pusht |
pyflyt |
1 | rocket |
roadster |
5 | roadster |
| Total | 80 |
Examples
examples/: short scripts for rendering, batching, action sequences and domain randomization.examples/lewm/: train and evaluate stable-worldmodel's LeWM world model on PushT, with frames thatenv.renderdraws on the training device from stored states.
Documentation
The full documentation is at galilai-group.github.io/stable-envs.
Questions
Open an issue on GitHub.
License
MIT, except the three PushT rasterizer files that port pygame's drawing routines, which are LGPL-2.1-or-later. See LICENSE and THIRD_PARTY_NOTICES.md.
Metadata
Release files for stable-envs 0.1.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 | Provenance | Actions |
|---|---|---|---|---|
| stable_envs-0.1.0.tar.gz | 958.5 kB | With provenance | Details for stable_envs-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stable_envs-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for stable_envs-0.1.0-py3-none-any.whl |
Total release size: 2.1 MB
Release files / stable_envs-0.1.0.tar.gz
| Download URL | stable_envs-0.1.0.tar.gz |
|---|---|
| Size | 958.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ebb9b312f63c3663cbd9c94a1a04038bb0c72a32e0264790fb44db15bc3409ed
|
|
BLAKE2b-256 checksum How to use checksums |
9c2ff937a111073c3d13fcea8b4ccb6f7fec33b81bd3526e136d29f2ef58ee72
|
| 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 Nov 13, 2026.
Transparency logRelease files / stable_envs-0.1.0-py3-none-any.whl
| Download URL | stable_envs-0.1.0-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67c451aa286125aac819cdcc89c6b28df3644ee800592474a36c0cfd3515f720
|
|
BLAKE2b-256 checksum How to use checksums |
fb68a4d493bc5279a309a6a0e5b49255e022ef43d70d15b4b0326798f3b6a903
|
| 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 Nov 13, 2026.
Transparency logSecurity for stable-envs 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for stable_envs-0.1.0.tar.gz
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 Nov 13, 2026.
Transparency logA 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.