Examples
Example programs
The programs of the ormaos-examples repository that every output on this site was recorded from, one page per program.
Every command output on this site is the output of the real ormaos command line on one of these programs, at the commits pinned in sources.json, on Python 3.14 on Linux. scripts/generate.py copies each program to a new folder, runs it as its README says, records it, and runs the reading commands. Durations, times, sizes and process ids change from run to run and are written ….
| Program | Kind | Needs | Guide |
|---|---|---|---|
| order-sync | a job that applies orders to an inventory in SQLite | standard library | Scheduled job |
| web-backend | a FastAPI service over SQLite, called through its test client | fastapi, httpx | Web backend |
| data-pipeline | a pandas report from two CSV files | pandas | Data pipeline |
| notebook | a Jupyter notebook with with ormaos.record(): in its cells | nbclient, nbformat, ipykernel | Notebook |
| ml-training | a PyTorch training loop on CPU | torch | ML training |
| rl-env | an environment with a reward and an episode loop | standard library | RL environment |
| ai-app | an app that calls a model API over HTTP, here a local stand-in | standard library | LLM app |
| agent-change | a git repository and a change a coding agent made to it | standard library, git | Agent checking a change |
The source of each is in ormaos-examples. Each program prints one ordinary line, and in each execution something happened that the line does not say.
Run one yourself#
In a Python 3.12 or newer with Ormaos and the folder's requirements.txt:
git clone https://github.com/ormaos/ormaos-examples && cd ormaos-examples/use-cases
python3 -m venv .venv && .venv/bin/pip install git+https://github.com/ormaos/ormaos-python -r web-backend/requirements.txt
cd web-backend && ../.venv/bin/ormaos run -- ../.venv/bin/python main.pyFor ml-training, the CPU build of torch is enough: add --extra-index-url https://download.pytorch.org/whl/cpu to the pip install.
The benchmark#
The same programs are the tasks of the agent benchmark of ormaos-examples. See Benchmarks.