Skip to main content

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 with TLS (default image CMD), connect via TCP and trust the daemon CA:

async with AbbenayClient(
    host="localhost",
    port=50051,
    tls=True,
    ca_cert="/path/to/ca.crt",
) 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 with --grpc-tls) and the port published (-p 50051:50051). Copy or mount <runtime-dir>/tls/ca.crt for client trust.

See docs/CONTAINER.md for full container deployment instructions and the --insecure escape hatch.

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

Metadata

Release files for abbenay-client 2026.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for abbenay-client 2026.9.0
File Size Uploaded Provenance Actions
abbenay_client-2026.9.0.tar.gz 37.3 kB With provenance Details for abbenay_client-2026.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for abbenay-client 2026.9.0
File Interpreter ABI Platform Actions
abbenay_client-2026.9.0-py3-none-any.whl Python 3 none any Details for abbenay_client-2026.9.0-py3-none-any.whl

Total release size: 76.5 kB

Release files / abbenay_client-2026.9.0.tar.gz

Download URL abbenay_client-2026.9.0.tar.gz
Size 37.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3d41c7dbfefdfd50804cfc3c53625dee31c5d41b1736a43ba1cbb94ec0c27522
BLAKE2b-256 checksum
How to use checksums
83e98966363146fcb1b0a1a1f666b016a75bf21e747742219d15ec5b3f603e9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / abbenay_client-2026.9.0-py3-none-any.whl

Download URL abbenay_client-2026.9.0-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5011e2a791ac54325d3cb6aba096cf1fcf1fe445cbe15a4453c2ecf4bedce6a5
BLAKE2b-256 checksum
How to use checksums
ed5778328c5b0d4054613578a41dd3dc5bf341c9b8ea9ef0943ae55172897a39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Security for abbenay-client 2026.9.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for abbenay_client-2026.9.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

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.

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