Skip to main content

A lightweight Python client for Ollama with context management and streaming support.

Project description

🐪 Camel-ollama

A lightweight Python client for Ollama that makes it easy to:

  • Chat with models (supports streaming or one-shot responses).
  • Persist and reload conversation context.
  • Manage models (list, pull, delete).
  • Generate embeddings.

🚀 Installation

pip install camel-py

Quickstart example

from camel import CamelClient

with CamelClient(model="llama3") as client:
    # Simple one-shot response
    resp = client.chat("Hello, who are you?")
    print(resp.text)

    # Streaming response
    print("Assistant: ", end="")
    resp = client.stream("Tell me a joke about camels")
    print(resp.text)

📂 Examples

See the examples/ directory for more examples.

🔧 Features

  • Streaming API: real-time token streaming (.stream()).
  • Context management: save/load/clear conversation history.
  • Model management: list, pull, and delete Ollama models.
  • Embeddings: generate embeddings for text.

Project details


Download files

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

Source Distribution

camel_py-0.1.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

camel_py-0.1.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: camel_py-0.1.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for camel_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 cadc2916545620dfed6a572d4d768e64a9c60a2725a3baf6236900901544725e
MD5 c7db33c6eabf5e71fad9d69bfca05a3a
BLAKE2b-256 6add7dd2a53f0e92d19b045bc548a4d24b828864e1e5ab8b381bc365bdff3a89

See more details on using hashes here.

File details

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

File metadata

  • Download URL: camel_py-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for camel_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68451564b0e409ad7834f488fcd683aa5464ecac2c1f9c7adf0148555543a2f6
MD5 3c011bd85906b4b109e833504738a786
BLAKE2b-256 2dc4b1132c32018a020f3fd61d4d4eedc23b4b10d9e44a0a65cd940855f28c9c

See more details on using hashes here.

Supported by

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