murk (Python)
Python bindings for the Murk simulation engine.
murk gives you:
- Native Rust performance via PyO3 bindings
- Gymnasium-compatible environment adapters
- Batched stepping for high-throughput RL training
- Typed Python API surface (
py.typed+.pyistubs)
Install
python -m pip install murk
Requirements:
- Python 3.12+
Quick Start (Gymnasium)
MurkEnv is designed for subclassing. Override hook methods to map actions,
reward, and episode boundaries for your task.
import numpy as np
from murk import (
Config,
EdgeBehavior,
FieldMutability,
MurkEnv,
ObsEntry,
PropagatorDef,
WriteMode,
)
class SimpleEnv(MurkEnv):
def __init__(self, seed: int = 42):
cfg = Config()
cfg.set_space_line1d(10, EdgeBehavior.Absorb)
cfg.add_field("value", mutability=FieldMutability.PerTick)
cfg.set_dt(0.1)
cfg.set_seed(seed)
def step_fn(reads, reads_prev, writes, tick_id, dt, cell_count):
writes[0][:] = float(tick_id)
PropagatorDef("inc", step_fn, writes=[(0, WriteMode.Full)]).register(cfg)
super().__init__(cfg, [ObsEntry(0)], n_actions=2, seed=seed)
self._tick_limit = 100
def _compute_reward(self, obs, info):
return -float(np.sum(obs))
def _check_terminated(self, obs, info):
return False
def _check_truncated(self, obs, info):
return info["tick_id"] >= self._tick_limit
env = SimpleEnv()
obs, info = env.reset(seed=0)
obs, reward, terminated, truncated, info = env.step(0)
env.close()
High-Throughput Vectorized RL
BatchedVecEnv steps all worlds in one Rust call (single GIL release), which
removes per-world FFI overhead.
import numpy as np
from murk import BatchedVecEnv, Config, EdgeBehavior, FieldMutability, ObsEntry
def make_config(i: int) -> Config:
cfg = Config()
cfg.set_space_line1d(64, EdgeBehavior.Absorb)
cfg.add_field("energy", mutability=FieldMutability.PerTick)
cfg.set_seed(i)
return cfg
env = BatchedVecEnv(
config_factory=make_config,
obs_entries=[ObsEntry(0)],
num_envs=32,
)
obs, infos = env.reset(seed=0)
obs, rewards, terminateds, truncateds, infos = env.step(np.zeros(32))
env.close()
Low-Level API
If you want direct control of stepping and commands, use World and ObsPlan
from murk._murk / murk.
Core types:
Config,World,CommandObsEntry,ObsPlanStepMetrics(timings, queue/realtime counters, sparse reuse counters)
Package Links
Metadata
Release files for murk 0.2.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 |
|---|---|---|---|---|
| murk-0.2.0.tar.gz | 415.8 kB | With provenance | Details for murk-0.2.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| murk-0.2.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for murk-0.2.0-cp312-abi3-win_amd64.whl |
| murk-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ x86-64 | Details for murk-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| murk-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ ARM64 | Details for murk-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
| murk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64 | Details for murk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl |
| murk-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl | CPython 3.12 | abi3 | macOS 10.12+ x86-64 | Details for murk-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl |
Total release size: 4.0 MB
Release files / murk-0.2.0.tar.gz
| Download URL | murk-0.2.0.tar.gz |
|---|---|
| Size | 415.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5dc820ac16142643accd8ba7294a6bdc9270aef953c4a9114b0e6e622e49c2c3
|
|
BLAKE2b-256 checksum How to use checksums |
dce775ccfff977b380cf225ed96fa26b4264b45140434f2854da2e86aa5c4406
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 12, 2026.
Transparency logRelease files / murk-0.2.0-cp312-abi3-win_amd64.whl
| Download URL | murk-0.2.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 592.3 kB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
20d97038058c533615c4624c5bf81be5a2acc678e658ae4e04c44cfef12b6e0a
|
|
BLAKE2b-256 checksum How to use checksums |
93258d44c576e9714c2ea245c267a1be1c1fca2ebc5263a9ff24f87e4b1ab23f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 12, 2026.
Transparency logRelease files / murk-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | murk-0.2.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 803.7 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
5e2fb3161b93e9ed2c3ea7b7d3ae6bf57cd5b2da0bad44f026416065b1dbb9f0
|
|
BLAKE2b-256 checksum How to use checksums |
a1bf870e52e53e174f9b8827c1c73be0ede5d7cd77ea20b99c16e86535f420ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 12, 2026.
Transparency logRelease files / murk-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | murk-0.2.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 779.9 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
8ba5b24cf1216a36c1da710bbe16646140d92a280f092dee8c5319884f7ca618
|
|
BLAKE2b-256 checksum How to use checksums |
1f82f978ae4b4cf5b4957a8dee30e663f9553d489d30a27d7bf3f02d428af5c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 12, 2026.
Transparency logRelease files / murk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | murk-0.2.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 714.0 kB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f442eaa5918113dfa6e26ad93343553bc9e61482f0a9dc97aa85755ed1148791
|
|
BLAKE2b-256 checksum How to use checksums |
a0271f3375ff97276e8d288cc46b645f2b496e6bafd64715680c74f0df7510ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 12, 2026.
Transparency logRelease files / murk-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl
| Download URL | murk-0.2.0-cp312-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 732.1 kB |
| Tags | CPython 3.12 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
3bca520e552b898195aea5549db5d4d2e7b3317b2eb20f292076c376433bac94
|
|
BLAKE2b-256 checksum How to use checksums |
2a37023a5d10640020ca0204f3e18f3c20665918cc8528b5e75b071d845574ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 12, 2026.
Transparency logSecurity for murk 0.2.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
All 6 files in this release have been uploaded with provenance metadata.
Attestation for murk-0.2.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 Jun 12, 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.