Skip to main content

Ollama FastAPI Wrapper

A simple FastAPI wrapper for Ollama models.

Installation

pip install ollama-fastapi

Usage

Run API server

ollama-fastapi

Call API

curl -X POST http://127.0.0.1:8000/generate \
     -H "Content-Type: application/json" \
     -d '{"prompt": "Write a haiku about FastAPI"}'

Use in Python

from ollama_fastapi.client import OllamaClient

ollama = OllamaClient("llama3")
print(ollama.generate("Hello world"))

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ollama_fastapi-0.1.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ollama_fastapi-0.1.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ollama_fastapi-0.1.1.tar.gz.

File metadata

  • Download URL: ollama_fastapi-0.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ollama_fastapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7f8765f1d4aa118c8206d9f924340bd6f2824cc5506bb299f96a5a4c386570a6
MD5 664bb98477b0d7b567f59650bb4e82f8
BLAKE2b-256 6bbd8a9af3bb474e623c67b8704ec407401ae3f97f1936bbf3d644f2eeb3348f

See more details on using hashes here.

File details

Details for the file ollama_fastapi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ollama_fastapi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ollama_fastapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bac82453ebe1cc4943631a9c1f2b5ae8590facd6549b75bb61fde8b051779035
MD5 4853d1a3b5581a624fe62442b7be6051
BLAKE2b-256 20e96667527851d6d9989e2871545349b8268d5d8f8c69bedfd4ab144932bb2d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page