Metadata-Version: 2.4
Name: swarmauri_transport_httpx
Version: 0.1.0.dev5
Summary: Synchronous, asynchronous, buffered, and streaming HTTPX transport for Swarmauri.
License: Copyright 2024 Jacob Stewart
         
         Licensed under the Apache License, Version 2.0 (the "License");
         you may not use this file except in compliance with the License.
         You may obtain a copy of the License at
         
             http://www.apache.org/licenses/LICENSE-2.0
         
         Unless required by applicable law or agreed to in writing, software
         distributed under the License is distributed on an "AS IS" BASIS,
         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
         See the License for the specific language governing permissions and
         limitations under the License.
License-File: LICENSE
Keywords: swarmauri,httpx,http,streaming,async
Author: Jacob Stewart
Author-email: jacob@swarmauri.com
Requires-Python: >=3.10,<3.13
Classifier: Development Status :: 1 - Planning
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: httpx (>=0.27,<1)
Requires-Dist: swarmauri_base (>=0.11.0.dev5)
Requires-Dist: swarmauri_core (>=0.11.0.dev5)
Description-Content-Type: text/markdown

![Swarmauri](https://github.com/swarmauri/swarmauri-sdk/blob/3d4d1cfa949399d7019ae9d8f296afba773dfb7f/assets/swarmauri.brand.theme.svg)

[![PyPI version](https://img.shields.io/pypi/v/swarmauri_transport_httpx.svg)](https://pypi.org/project/swarmauri_transport_httpx/) [![Python](https://img.shields.io/pypi/pyversions/swarmauri_transport_httpx.svg)](https://pypi.org/project/swarmauri_transport_httpx/) [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE) [![Downloads](https://static.pepy.tech/badge/swarmauri_transport_httpx)](https://pepy.tech/project/swarmauri_transport_httpx) [![Hits](https://hits.sh/github.com/swarmauri/swarmauri-sdk.svg)](https://hits.sh/github.com/swarmauri/swarmauri-sdk/)

# swarmauri_transport_httpx

## Features

- Synchronous and asynchronous buffered requests.
- Genuine synchronous and asynchronous streaming contexts.
- Persistent connection pooling with explicit ownership and cleanup.
- Caller-supplied HTTPX clients for testing and custom network stacks.
- Provider-neutral Swarmauri HTTP interfaces.

## Installation

```bash
uv add swarmauri_transport_httpx
pip install swarmauri_transport_httpx
```

## Usage

Use `HttpxClient.request`/`arequest` for buffered responses and `stream`/`astream` for incremental response processing.

```python
from swarmauri_transport_httpx import HttpxClient

with HttpxClient(base_url="https://api.example.com") as client:
    response = client.request("GET", "/models")
    response.raise_for_status()
```

Injected `httpx.Client` and `httpx.AsyncClient` instances remain caller-owned and are never closed by the adapter.

