Skip to main content

Abbenay gRPC client for Python

Project description

Abbenay Python Client

A Python gRPC client for the Abbenay daemon.

Installation

Install from PyPI:

pip install abbenay-client

Note: The pip package is abbenay-client but the Python import is abbenay_grpc:

from abbenay_grpc import AbbenayClient

Cross-platform: works on Linux, macOS, and Windows with Python 3.9+.

Quick Start

import asyncio
from abbenay_grpc import AbbenayClient

async def main():
    async with AbbenayClient() as client:
        async for chunk in client.chat("openai/gpt-4o", "Hello!"):
            if chunk.type == "text":
                print(chunk.text, end="")
        print()

asyncio.run(main())

Event Loop Lifecycle

grpc.aio channels are bound to the event loop that was active at connect() time. If you call asyncio.run() more than once (which creates and destroys loops), call reconnect() in the new loop:

async def preflight():
    async with AbbenayClient() as client:
        await client.health_check()

asyncio.run(preflight())  # loop created and closed

async def main():
    client = AbbenayClient()
    await client.connect()  # auto-detects dead channel, reconnects
    # ... or explicitly: await client.reconnect()

Connecting to a Container

When the daemon runs in a container, connect via TCP instead of the default Unix socket:

async with AbbenayClient(host="localhost", port=50051) as client:
    async for chunk in client.chat("openrouter/anthropic/claude-sonnet-4", "Hello!"):
        if chunk.text:
            print(chunk.text, end="")

The container must be started with --grpc-port 50051 (the default Containerfile CMD does this) and the port published (-p 50051:50051).

See docs/CONTAINER.md for full container deployment instructions.

Features

  • Chat: Streaming chat with any configured model
  • Sessions: Create, list, fork, and manage chat sessions
  • Models: List available models from all providers
  • Tools: Dynamic MCP server registration and tool filtering
  • Secrets: Manage API keys via keychain
  • Configuration: Get/update daemon config

Requirements

  • Python 3.9+
  • Abbenay daemon running (abbenay daemon)

License

MIT

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

abbenay_client-2026.6.5a0.tar.gz (35.9 kB view details)

Uploaded Source

Built Distribution

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

abbenay_client-2026.6.5a0-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file abbenay_client-2026.6.5a0.tar.gz.

File metadata

  • Download URL: abbenay_client-2026.6.5a0.tar.gz
  • Upload date:
  • Size: 35.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for abbenay_client-2026.6.5a0.tar.gz
Algorithm Hash digest
SHA256 df77739ad5f06bcaad8584582566f6548687bdd2e3f324cb067956686fc88ca9
MD5 c1f2e818ae6be995e999f3f7c41eb21c
BLAKE2b-256 b4e30d1cd156dc998fa942fb53baa7b379843c2566dfc6f64686b4ff23abbfcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for abbenay_client-2026.6.5a0.tar.gz:

Publisher: release.yml on redhat-developer/abbenay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file abbenay_client-2026.6.5a0-py3-none-any.whl.

File metadata

File hashes

Hashes for abbenay_client-2026.6.5a0-py3-none-any.whl
Algorithm Hash digest
SHA256 62bb78c6a5097894265a087605fdbbea4d45c07fcf1c0473c3880b9dae523a1e
MD5 a4275bf69689ad247dfc50fd785abef3
BLAKE2b-256 5edde4b97882cf255b31d26a59f6b2fd6c854e6e4212ed173cd532e3465f9a3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for abbenay_client-2026.6.5a0-py3-none-any.whl:

Publisher: release.yml on redhat-developer/abbenay

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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