Metadata-Version: 2.4
Name: inferact
Version: 0.1.0a2
Summary: Typed client and Rich CLI for the Inferact management API
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: inferact,inference,kubernetes,llm,vllm
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: attrs<27,>=25.3
Requires-Dist: httpx<0.29,>=0.28.1
Requires-Dist: jsonschema<5,>=4.26
Requires-Dist: keyring<26,>=25
Requires-Dist: rich<16,>=15
Provides-Extra: inference
Requires-Dist: openai<3,>=2.29.0; extra == 'inference'
Description-Content-Type: text/markdown

# Inferact

Python client and `inferact` command-line tool for the Inferact management API:
list and inspect deployments, create and approve previews, follow operations, and
talk to a running deployment through an OpenAI-compatible inference client.

## Status

This is a pre-release. Commands, Python APIs and output formats may change between
versions.

## Install

Requires Python 3.11 or later.

```sh
pip install --pre inferact                         # Python client and CLI
pip install --pre 'inferact[inference]'            # adds the OpenAI-compatible inference client
uv tool install --prerelease allow inferact        # CLI in its own environment
pipx install --pip-args=--pre inferact             # same, with pipx
```

## CLI

```sh
inferact login --base-url https://<install>
inferact open                                      # the portal in your browser
inferact deployments list
inferact deployments get ID
inferact config list                               # every setting and where it came from
curl -H "Authorization: Bearer $(inferact auth token)" https://<install>/api/v1/auth/me
```

Run `inferact --help` for every command. Add `--json` for machine-readable output.
Settings come from flags, then `INFERACT_*` environment variables, then `config.json`
(`inferact config set KEY VALUE`), then the saved profile.

## Python

```python
import os

from inferact import Inferact

# Settings resolve like the CLI: INFERACT_ACCESS_TOKEN and INFERACT_BASE_URL when the
# token is set, else the sign-in saved by `inferact login`.
with Inferact() as dock:
    for deployment in dock.deployments.list():
        print(deployment.id, deployment.name, deployment.status)

    d = dock.deployments.get(os.environ["DEPLOYMENT_ID"])
    # Requires the inference extra and INFERACT_INFERENCE_API_KEY.
    with d.client() as inference:
        response = inference.chat.completions.create(
            model=d.model_id,
            messages=[{"role": "user", "content": "Hello"}],
        )
        print(response.choices[0].message.content)
```

## Contributing

See `sdk/python/docs/DEVELOPMENT.md` in the repository for the local workflow, the full CLI
and SDK contract, and release steps.

## License

Apache License 2.0. See the LICENSE and NOTICE files shipped with the package.
