Quickstart notes
Run the polling script in a Docker container
One small image, the key passed at runtime, and a restart policy: the shortest path from a polling script on your laptop to one that runs unattended.
The polling script works on your laptop. The next question is how to run it somewhere that is not your laptop, and the boring, reliable answer is a container: one small image, the key injected at runtime, a restart policy for the bad days. Here is the whole setup, built on the Python quickstart, checked 2026-10-27.
The image
The quickstart's poll.py needs Python and one library, so the image is four lines:
FROM python:3.12-slim
RUN pip install requests
COPY poll.py /app/poll.py
CMD ["python", "/app/poll.py"]
Build it once, and the same artifact runs on any host that has Docker: docker build -t odds-poll . from the folder holding poll.py and the Dockerfile.
Notice what is not in the image: the key. Nothing about the API belongs in a build layer, because images get pushed, shared and cached in places you do not control.
The key enters at runtime
The script already reads its key and base URL from the environment, which is exactly where a container wants them. Pass them at run time and they never touch a file in the image:
services:
poll:
build: .
restart: unless-stopped
environment:
- ODDS_BASE_URL=https://...
- ODDS_API_KEY=your key
Two lines do the operational work. The environment entries inject the key and the base URL at runtime, and the restart policy brings the container back after a crash or a host reboot. For a poller, unless-stopped is the policy you want: it restarts on failure and on boot, and it still respects a deliberate stop. One docker compose up -d starts it.
Logs are the interface
A detached container is invisible until you ask. docker compose logs -f tails the script's prints, which for the quickstart means each moved money line as it arrives. That is enough for a watch setup. When you want the prices rather than the console, give the container a volume and let the script write its CSV there, so the data outlives the container it came from.
If you change the script, rebuild and recreate: docker compose build, then docker compose up -d again. The cycle is fast because the image is small, and small is a feature here: fewer layers, fewer surprises, faster restarts.
What the free key budget means inside a container
Nothing changes about the allowance. The quickstart's cadence guidance still applies: one call every few seconds drains the free key's 100 daily calls in minutes, and a 15-minute poll stretches the same budget across a day, as the quickstart notes, checked 2026-10-27. The container changes where the script runs, never how often it should call.
Set the interval for the key you have, not for the host you rented. The container will happily outrun your quota all day; the Dockerfile does not know your plan.
A script, a four-line image, two environment variables and a restart policy. That is the whole jump from "works on my machine" to "runs without me".