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)
| File | Size | Uploaded | |
|---|---|---|---|
| ollama_fastapi-0.1.1.tar.gz | 2.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ollama_fastapi-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
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
|