Skip to main content

UniEnv: robot environments, policies and data, unified

Docs PyPI License: Apache-2.0

UniEnv is a Python framework for building robot environments and robot data pipelines on top of a shared set of abstractions.

Documentation: https://unienvorg.github.io/UniEnv/

It gives you:

  • a common environment interface for simulation and real-robot control
  • a functional environment variant for explicit state passing
  • backend-aware spaces, wrappers, and transformations
  • world and node composition utilities for multi-component environments
  • lightweight remote execution (RPC over TCP, Unix sockets or WebSocket) with observer streams
  • replay buffers, storages, samplers, and dataset adapters for offline data workflows

The project is designed around one idea: environment code and dataset code should not have to be rewritten every time the simulator, robot, or tensor library changes.

What Is In The Package

  • unienv_interface: environments, worlds, nodes, policies, spaces, wrappers, and transformations
  • unienv_data: batches, replay buffers, storage backends, samplers, and dataset integrations
  • backend portability through XBArray and DLPack-based conversion paths

Installation

Install the base package:

pip install unienv

Install optional extras when needed:

pip install "unienv[gymnasium,video]"

Some integrations and storage backends rely on their own ecosystem packages such as pyarrow, h5py, datasets, huggingface_hub, torch, or jax. Install the ones that match the features you plan to use.

Quick Example

The example below shows the core building blocks without depending on a specific simulator:

import numpy as np

from unienv_interface.backends.numpy import NumpyComputeBackend
from unienv_interface.space.spaces import BoxSpace, DictSpace
from unienv_interface.transformations import RescaleTransformation
from unienv_data.replay_buffer import ReplayBuffer
from unienv_data.storages.parquet import ParquetStorage

backend = NumpyComputeBackend

transition_space = DictSpace(
    backend,
    {
        "obs": BoxSpace(backend, 0.0, 1.0, np.float32, shape=(4,)),
        "action": BoxSpace(backend, -1.0, 1.0, np.float32, shape=(2,)),
        "reward": BoxSpace(backend, -np.inf, np.inf, np.float32, shape=()),
    },
)

action_transform = RescaleTransformation(new_low=0.0, new_high=1.0)
normalized_action_space = action_transform.get_target_space_from_source(
    transition_space["action"]
)

buffer = ReplayBuffer.create(
    ParquetStorage,
    transition_space,
    cache_path="cache/demo_buffer",
    capacity=10_000,
)

print(normalized_action_space)
print(buffer.single_space)

For online logging, append one sample at a time with ReplayBuffer.append(value) and close each segment with mark_segment_end(). Segment visibility depends on the storage backend: legacy storages may expose writes immediately, while VideoStorage finalizes its active segment before it becomes readable.

In practice, you would pair these components with your own Env, FuncEnv, World, or WorldNode implementations, then add wrappers and storage backends as needed.

Documentation

Documentation: https://unienvorg.github.io/UniEnv/

Start with:

  • docs/getting-started.md for installation and the package map
  • docs/concepts/ for the core abstractions
  • docs/guides/ for wrappers, replay buffers, and dataset integrations
  • docs/guides/remote-execution.md for remote environments, nodes, and worlds (pip install 'unienv[network]')

Development

For local development:

git clone https://github.com/UniEnvOrg/UniEnv
cd UniEnv/UniEnvPy
pip install -e .[dev,gymnasium,video]
pytest

If you want to exercise optional backends or integrations during development, install their matching dependencies explicitly before running the relevant tests.

Cite

If you use UniEnv in research, please cite it. The current author list and BibTeX are on unienvorg.github.io.

Acknowledgements

UniEnv is influenced by Gymnasium and OpenAI Gym, and builds on ideas from the Array API Standard and DLPack.

Metadata

Release files for unienv 1.0.0

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

Source distribution (sdist)

Source distribution for unienv 1.0.0
File Size Uploaded Provenance Actions
unienv-1.0.0.tar.gz 397.7 kB With provenance Details for unienv-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unienv 1.0.0
File Interpreter ABI Platform Actions
unienv-1.0.0-py3-none-any.whl Python 3 none any Details for unienv-1.0.0-py3-none-any.whl

Total release size: 879.0 kB

Release files / unienv-1.0.0.tar.gz

Download URL unienv-1.0.0.tar.gz
Size 397.7 kB
Tags Source
SHA-256 checksum
How to use checksums
15e6c7ba29494a429f9ea1b2db957ef269b0fa515605f07b908a50b65fc773fb
BLAKE2b-256 checksum
How to use checksums
1c9d4c86acc983492ad2ce22f3a61fac37e305516cafa040fcaa260b27a4b21d
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 23, 2026.

Transparency log

Release files / unienv-1.0.0-py3-none-any.whl

Download URL unienv-1.0.0-py3-none-any.whl
Size 481.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc84da339339373585f478aa4b0f4ee2fd8a48b485c87e33b5cb17aa0b1ecfde
BLAKE2b-256 checksum
How to use checksums
889c033f0441747c81a2a44244e8e22ed98fa75086022887cd98d605c4ba8034
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 23, 2026.

Transparency log

Security for unienv 1.0.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.

Select from 2 files

Attestation for unienv-1.0.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 23, 2026.

Transparency log

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.

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