Skip to main content

Ollama API Python Client

A Python client for interacting with the Ollama API.

Installation

pip install ollama_api

Usage

from ollama_api import OllamaClient

client = OllamaClient()
response = client.generate_completion(model="llama3", prompt="Why is the sky blue?")
print(response)

Documentation

For more details, refer to the Ollama API documentation.

Step 6: Install and Test

Navigate to the root directory of your package and install it locally:

pip install .

Now you can test the package by importing and using the OllamaClient class in a Python script or interactive session.

This basic package structure and client class should give you a good starting point for interacting with the Ollama API using Python. You can expand and refine it further based on your specific needs and the API's capabilities.

Metadata

Release files for ollama-api 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-api 0.1.1
File Size Uploaded
ollama_api-0.1.1.tar.gz 2.4 kB Details

Built distribution (wheel)

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

Total release size: 5.0 kB

Release files / ollama_api-0.1.1.tar.gz

Download URL ollama_api-0.1.1.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c77cb1086a5900e1ad26dc646b10c1146fd8a14f5b7f099474dca380c459dd32
BLAKE2b-256 checksum
How to use checksums
8988e80904ca0a76d3b06b6c522dc8ca3c637de137afeda04a92c32fc5a34f93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.8

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

Download URL ollama_api-0.1.1-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75051eb95dc05f2a24f4e227eae02f8c7de8ee85e5072b44c0c53cd079df75b1
BLAKE2b-256 checksum
How to use checksums
c79cc20c8f2c583f0f05510672faca424dc14855cfd6372406d61fd57107560e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.1.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