CLI and Python client for SWECC BenchAnything / Mesocosm (mesocosm + bench commands).
Project description
swecc-mesocosm
CLI and Python client for SWECC's BenchAnything / Mesocosm platform.
pip install swecc-mesocosm
mesocosm --help
One package, one command (mesocosm). There is no separate bench binary or swecc-bench on PyPI.
Env author quick start
mkdir my-env && cd my-env
mesocosm init
ollama pull llama3.2
python adapter.py # terminal 1
mesocosm run local # terminal 2 — Ollama + benchanything.json, no submit
When ready for the platform: mesocosm auth login → mesocosm env submit (creates the domain from benchanything.json in your repo) → mesocosm run create with the returned domain_id. See LOCAL_DEV.md in your repo after mesocosm init. You do not need mesocosm register domain.py for this flow.
Command overview
| Area | Examples |
|---|---|
| Local env / Ollama | mesocosm init, mesocosm run local |
| Auth & teams | mesocosm auth login, mesocosm team create |
| Submit repo | mesocosm env submit --github-url … |
| Platform runs | mesocosm run create, mesocosm run export RUN_ID |
| Domain helpers | mesocosm suggest, mesocosm validate, mesocosm register (API JSON/flags; legacy register domain.py only if your repo has DOMAIN_CONFIG) |
| Bench-api eval | mesocosm doctor, mesocosm eval test, mesocosm run get |
See PACKAGING.md in this directory for how bench_common is bundled and how mesocosm run routes local vs platform subcommands.
Install (dev)
pip install -e ./packages/swecc-mesocosm
Configure
mesocosm doctor # checks https://api.swecc.org/bench (default)
mesocosm doctor --local # checks adapter :8765 + local bench-api :8010
export MESOCOSM_LOCAL=1 # same local profile for all commands
Remote defaults: https://api.swecc.org/bench and https://api.swecc.org for auth. Local: see infra/mesocosm.env.example.
Python client
import asyncio
from swecc_mesocosm import BenchClient
async def main():
c = BenchClient(base_url="http://127.0.0.1:8010")
try:
domains = await c.list_domains(published_only=True)
print(len(domains), "published")
finally:
await c.aclose()
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swecc_mesocosm-0.2.8-py3-none-any.whl.
File metadata
- Download URL: swecc_mesocosm-0.2.8-py3-none-any.whl
- Upload date:
- Size: 80.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd14abcda9edf7e89a24ce15717c2a7c6a1425079fb40cf082def070f2cb49f3
|
|
| MD5 |
3b4b40d74c0fa509ffcd76c9430e4c9e
|
|
| BLAKE2b-256 |
3cb7991b6c1d730af7a89df1cc01703f3c753b8ebe4f04a615826e477b74de43
|