Metadata-Version: 2.4
Name: cogstack-model-gateway-client
Version: 0.1.8
Summary: A Python client for the CogStack Model Gateway
License: Apache-2.0
License-File: LICENSE
Author: Phoevos Kalemkeris
Author-email: phoevos.kalemkeris@ucl.ac.uk
Requires-Python: >=3.10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Intended Audience :: Developers
Requires-Dist: httpx (>=0.28.1,<0.29.0)
Requires-Dist: tenacity (>=9.1.2,<10.0.0)
Project-URL: Bug Tracker, https://github.com/CogStack/cogstack-model-gateway/issues
Project-URL: Documentation, https://github.com/CogStack/cogstack-model-gateway/tree/main/client/README.md
Project-URL: Homepage, https://github.com/CogStack/cogstack-model-gateway
Project-URL: Repository, https://github.com/CogStack/cogstack-model-gateway
Description-Content-Type: text/markdown

# CogStack Model Gateway Client

A Python client for interacting with the CogStack Model Gateway. The default and recommended client
implementation is asynchronous, but a blocking synchronous one is also provided for easier
experimentation.

## Installation

```bash
pip install cogstack-model-gateway-client
```

## Usage

The project is under active development and so is the documentation. Seems like looking at the
source code is the only way to figure out what the client does.

### Async Client

```python
import asyncio

from cogstack_model_gateway_client import GatewayClient


async def main():
    async with GatewayClient(base_url="http://your-gateway-url", default_model="your-model") as client:
        # Generate annotations for a given text
        result = await client.process("Sample input text")

    print(result)


asyncio.run(main())
```

### Synchronous Client

```python
from cogstack_model_gateway_client import GatewayClientSync

client = GatewayClientSync(base_url="http://your-gateway-url", default_model="your-model")
result = client.process("Sample input text")
print(result)
```

