Spaces:
Running
Running
Lost Update v0: OpenEnv environment for concurrent writes to a shared JSON document
345483c verified Download client.py from jayzuccarelli/lost_update_env: direct link, hf CLI and curl.
- Browser
- Download file 647 Bytes
-
https://huggingface.co/spaces/jayzuccarelli/lost_update_env/resolve/main/client.py
- Command line
-
hf download hf://spaces/jayzuccarelli/lost_update_env/client.py
-
curl -L -o client.py https://huggingface.co/spaces/jayzuccarelli/lost_update_env/resolve/main/client.py
647 Bytes
| # SPDX-License-Identifier: BSD-3-Clause | |
| """Client for the Lost Update environment. | |
| >>> from lost_update_env import LostUpdateEnv | |
| >>> with LostUpdateEnv(base_url="http://localhost:8000").sync() as env: | |
| ... obs = env.reset(seed=7, tier="T1") | |
| ... uri = obs.observation.metadata["uri"] | |
| ... doc = env.call_tool("read", uri=uri) | |
| ... env.call_tool("update", uri=uri, content=doc["content"], expected_revision=doc["revision"]) | |
| """ | |
| from openenv.core.mcp_client import MCPToolClient | |
| class LostUpdateEnv(MCPToolClient): | |
| """MCP tool client: `list_tools()`, `call_tool(name, **kwargs)`, `reset()`, `step()`.""" | |