Skip to main content

ollama-serve

Keep your local Ollama server warm and your favorite models ready. This package offers small, composable helpers to check server health, start it when needed, and pull models on demand.

Install

uv add ollama-serve

Quick start

from ollama_serve import ensure_model_and_server_ready

if ensure_model_and_server_ready("llama3:latest"):
    print("Ready to chat.")

Common flows

from ollama_serve import (
    is_ollama_running,
    run_ollama_server,
    is_model_installed,
    install_model,
)

is_ollama_running()
run_ollama_server()
is_model_installed("llama3:latest")
install_model("llama3:latest")

Tips

  • If Ollama is not on your PATH, install it from https://ollama.com/download.
  • Use smaller timeout values for snappier "is it up?" checks in dev loops.

Compatibility

  • macOS, Linux, and Windows (where Ollama runs locally).
  • Requires the ollama CLI on your PATH.

Logging and config

  • Uses standard Python logging via logging.getLogger("ollama_serve").
  • Default settings can be overridden with env vars:
    • OLLAMA_SERVE_TIMEOUT (seconds, default 0.2)
    • OLLAMA_SERVE_RETRIES (default 1)
    • OLLAMA_SERVE_RETRY_DELAY (seconds, default 0.2)

Metadata

Release files for ollama-serve 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ollama-serve 0.0.1
File Size Uploaded
ollama_serve-0.0.1.tar.gz 88.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ollama-serve 0.0.1
File Interpreter ABI Platform
ollama_serve-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 93.2 kB

Release files / ollama_serve-0.0.1.tar.gz

Download URL ollama_serve-0.0.1.tar.gz
Size 88.3 kB
Tags Source
SHA-256 checksum
How to use checksums
789266e7cc41cef0833e63eb50785d932b6f42579c175e238f01c0f3769bc762
BLAKE2b-256 checksum
How to use checksums
caa0311ba21d5fd4fc36f9506702c736c1ad5afe81a034d665b746bbe6740f60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release files / ollama_serve-0.0.1-py3-none-any.whl

Download URL ollama_serve-0.0.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5411dc11f97dbf0f9e6cf58c33c051c0134e3c89686ccf07866e219b151765b0
BLAKE2b-256 checksum
How to use checksums
d6cf3adfcba92556f04fe3bb8100a9cbc65e3aaebda0aa7c5fea618f702b02cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page