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"))

Metadata

Release files for ollama-fastapi 0.1.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-fastapi 0.1.1
File Size Uploaded Provenance Actions
ollama_fastapi-0.1.1.tar.gz 2.9 kB Without provenance Details for ollama_fastapi-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ollama-fastapi 0.1.1
File Interpreter ABI Platform Actions
ollama_fastapi-0.1.1-py3-none-any.whl Python 3 none any Details for ollama_fastapi-0.1.1-py3-none-any.whl

Total release size: 6.9 kB

Release files / ollama_fastapi-0.1.1.tar.gz

Download URL ollama_fastapi-0.1.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7f8765f1d4aa118c8206d9f924340bd6f2824cc5506bb299f96a5a4c386570a6
BLAKE2b-256 checksum
How to use checksums
6bbd8a9af3bb474e623c67b8704ec407401ae3f97f1936bbf3d644f2eeb3348f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / ollama_fastapi-0.1.1-py3-none-any.whl

Download URL ollama_fastapi-0.1.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bac82453ebe1cc4943631a9c1f2b5ae8590facd6549b75bb61fde8b051779035
BLAKE2b-256 checksum
How to use checksums
20e96667527851d6d9989e2871545349b8268d5d8f8c69bedfd4ab144932bb2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for ollama-fastapi 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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