Metadata-Version: 2.5
Name: hedron-gradio
Version: 0.2.0
Summary: Production-grade Gradio client interop for Hedron (RFC-0049 / RFC-0067)
Project-URL: Homepage, https://github.com/eddiethedean/hedron
Project-URL: Repository, https://github.com/eddiethedean/hedron
Project-URL: Issues, https://github.com/eddiethedean/hedron/issues
Project-URL: Changelog, https://github.com/eddiethedean/hedron/blob/main/packages/hedron-gradio/CHANGELOG.md
Project-URL: Documentation, https://hedron.readthedocs.io/en/latest/
Author-email: Odos Matthews <odosmatthews@gmail.com>
Maintainer-email: Odos Matthews <odosmatthews@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: gradio,hedron,inference,interop
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: <3.15,>=3.11
Requires-Dist: hedron-core<0.35,>=0.34.0
Description-Content-Type: text/markdown

# hedron-gradio

[![PyPI](https://img.shields.io/pypi/v/hedron-gradio.svg)](https://pypi.org/project/hedron-gradio/)
[![Python](https://img.shields.io/pypi/pyversions/hedron-gradio.svg)](https://pypi.org/project/hedron-gradio/)
[![CI](https://img.shields.io/github/actions/workflow/status/eddiethedean/hedron/ci.yml?branch=main&label=CI)](https://github.com/eddiethedean/hedron/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/eddiethedean/hedron/blob/main/LICENSE)

Production-grade Gradio client interoperability for Hedron.

Endpoint discovery, allowlisted remote calls, typed predict / job / stream helpers,
bounded file transport, and Hugging Face vendor-node adapters — without embedding
Gradio’s UI runtime in core. Disabled by default; absence of this package adds no core
dependency or startup cost.

Also available as the flagship extra `hedron[gradio]`.

**Package maturity:** Beta · **Train:** `0.2.x` · pin `>=0.2.0,<0.3`

## Install

```bash
pip install "hedron-gradio>=0.2.0,<0.3"
# or
uv add "hedron-gradio>=0.2.0,<0.3"
# via flagship (at 0.34 train cut):
pip install "hedron[gradio]>=0.34.0,<0.35"
```

Requires Python 3.11–3.14.

For **live** Gradio endpoints, also install `gradio_client`. The package imports
without `gradio` or `gradio_client` installed; with declared endpoints and no
client library, helpers return stub-friendly status payloads.

## Quick start

```python
from hedron_gradio import GradioClientAdapter, GradioEndpoint, GradioRemoteConfig

config = GradioRemoteConfig.from_base_url("https://example.gradio.live")
adapter = GradioClientAdapter(
    base_url=config.base_url,
    enabled=True,
    remote_config=config,
    endpoints=(GradioEndpoint(name="predict", api_name="/predict", parameters={}),),
)

endpoints = adapter.discover()
result = adapter.predict("predict", {"text": "hi"})
```

With `enabled=False` (the default), `discover()` returns empty.

## Public API

| Symbol | Role |
|---|---|
| `GradioRemoteConfig` | Allowlisted destination policy |
| `GradioClientAdapter` | Discovery, predict, jobs, streams, file transfer |
| `GradioEndpoint` | Declared endpoint metadata |
| `GradioRemoteError` | Remote failure signal |
| `HuggingFaceVendorNode` / `hf_space_node` | HF Space vendor helpers |

## Links

- [Package docs](https://hedron.readthedocs.io/en/latest/packages/hedron-gradio/)
- [Gradio migration guide](https://hedron.readthedocs.io/en/latest/guides/gradio-migration/)
- [What's new in 0.34](https://hedron.readthedocs.io/en/latest/guides/whats-new-0.34.md)
- [Changelog](https://github.com/eddiethedean/hedron/blob/main/packages/hedron-gradio/CHANGELOG.md)
- [Source](https://github.com/eddiethedean/hedron/tree/main/packages/hedron-gradio)
- [Issues](https://github.com/eddiethedean/hedron/issues)

## License

MIT. See the [repository license](https://github.com/eddiethedean/hedron/blob/main/LICENSE).
