sekai needs Python 3.10 or newer. The core package depends only on NumPy (≥ 1.24) and
cloudpickle (used to ship environment factories to ProcVecEnv workers).
pip install sekai
Check the install with the command-line tool:
sekai --version
sekai list
| Extra | Installs | Needed for |
|---|---|---|
sekai[gymnasium] |
gymnasium>=1.0 |
sekai.compat: to_gymnasium() / from_gymnasium(), Stable-Baselines3, CleanRL, RLlib |
sekai[render] |
pillow, imageio, imageio-ffmpeg |
saving frames: save_gif() (Pillow), save_video() (imageio + ffmpeg) |
sekai[pettingzoo] |
pettingzoo>=1.24, gymnasium |
to_pettingzoo() / from_pettingzoo() for multi-agent libraries |
sekai[pandas] |
pandas>=1.5 |
MarketData.from_pandas() / from_long() |
sekai[all] |
gymnasium, pettingzoo, pandas and render extras |
everything at runtime |
sekai[test] |
pytest, pytest-cov, gymnasium, pettingzoo, pandas, pillow |
running the test suite |
sekai[docs] |
mkdocs-material, mkdocstrings[python] |
building this site |
sekai[dev] |
test + docs + mypy, ruff, pre-commit, build, twine |
contributing |
pip install "sekai[gymnasium,render]"
!!! note “Rendering needs no extras”
Drawing frames uses sekai’s own NumPy Canvas, so
CartPoleRenderer().render(env) works with a bare install. The render extra is only for
writing GIF/MP4 files.
git clone https://github.com/QianCapital/sekai
cd sekai
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev,gymnasium,render]"
pytest
See Contributing for the full development workflow.
sekai ships a py.typed marker and type-checks clean under mypy --strict. Environments,
spaces and results are generic, so annotations like sekai.Env[np.ndarray, np.intp] and
sekai.StepResult[np.ndarray] flow through to your code.